‪TYPO3CMS  ‪main
TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule Class Reference
Inheritance diagram for TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule:
TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface TYPO3\CMS\Adminpanel\ModuleApi\ConfigurableInterface TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface TYPO3\CMS\Adminpanel\Modules\CacheModule TYPO3\CMS\Adminpanel\Modules\DebugModule TYPO3\CMS\Adminpanel\Modules\InfoModule TYPO3\CMS\Adminpanel\Modules\PreviewModule TYPO3\CMS\Adminpanel\Modules\TsDebugModule

Public Member Functions

 injectConfigurationService (ConfigurationService $configurationService)
 
 isEnabled ()
 
 setSubModules (array $subModules)
 
 getSubModules ()
 
 hasSubmoduleSettings ()
 
 setModuleData (ModuleDataStorageCollection $moduleData)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface
 getIdentifier ()
 
 getLabel ()
 

Protected Member Functions

 getBackendUser ()
 
 getLanguageService ()
 
 isEnabledViaTsConfig ()
 

Protected Attributes

array $subModules = []
 
array $mainConfiguration
 
ConfigurationService $configurationService
 
ModuleDataStorageCollection $moduleData
 

Detailed Description

Abstract base class for Admin Panel Modules containing helper methods and default interface implementations Extend this class when writing own admin panel modules (or implement the Interface directly)

Definition at line 28 of file AbstractModule.php.

Member Function Documentation

◆ getBackendUser()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::getBackendUser ( )
protected

Definition at line 90 of file AbstractModule.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Adminpanel\Modules\CacheModule\getPageSettings().

◆ getLanguageService()

◆ getSubModules()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::getSubModules ( )

Returns an array of module instances

Returns
ModuleInterface[]

Implements TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface.

Definition at line 65 of file AbstractModule.php.

References TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\$subModules.

◆ hasSubmoduleSettings()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::hasSubmoduleSettings ( )

Return true if any of the submodules has settings to be rendered (can be used to render settings in a central place)

Implements TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface.

Definition at line 70 of file AbstractModule.php.

◆ injectConfigurationService()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::injectConfigurationService ( ConfigurationService  $configurationService)

◆ isEnabled()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::isEnabled ( )

Returns true if the module is -> either enabled via TSConfig "admPanel.enable" -> or any setting is overridden. Override is a way to use functionality of the admin panel without displaying the admin panel to users for example: hidden records or pages can be displayed by default

Implements TYPO3\CMS\Adminpanel\ModuleApi\ConfigurableInterface.

Definition at line 50 of file AbstractModule.php.

References TYPO3\CMS\Webhooks\Message\$identifier, TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface\getIdentifier(), and TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\isEnabledViaTsConfig().

◆ isEnabledViaTsConfig()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::isEnabledViaTsConfig ( )
protected

Returns true if TSConfig "admPanel.enable" is set for this module (or all modules)

Definition at line 103 of file AbstractModule.php.

References TYPO3\CMS\Webhooks\Message\$identifier, and TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface\getIdentifier().

Referenced by TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\isEnabled().

◆ setModuleData()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::setModuleData ( ModuleDataStorageCollection  $moduleData)

◆ setSubModules()

TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::setSubModules ( array  $subModules)

Sets array of module instances (instances of ModuleInterface) as submodules

Parameters
ModuleInterface[]$subModules

Implements TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface.

Definition at line 60 of file AbstractModule.php.

References TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\$subModules.

Member Data Documentation

◆ $configurationService

ConfigurationService TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::$configurationService
protected

◆ $mainConfiguration

array TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::$mainConfiguration
protected

Definition at line 33 of file AbstractModule.php.

◆ $moduleData

ModuleDataStorageCollection TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::$moduleData
protected

◆ $subModules

array TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule::$subModules = []
protected