‪TYPO3CMS  9.5
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\EditModule TYPO3\CMS\Adminpanel\Modules\InfoModule TYPO3\CMS\Adminpanel\Modules\PreviewModule TYPO3\CMS\Adminpanel\Modules\TsDebugModule

Public Member Functions

 __construct ()
 
bool isEnabled ()
 
 setSubModules (array $subModules)
 
 getSubModules ()
 
 hasSubmoduleSettings ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface
string getIdentifier ()
 
string getLabel ()
 

Protected Member Functions

BackendUserAuthentication FrontendBackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
bool isEnabledViaTsConfig ()
 

Protected Attributes

ModuleInterface[] $subModules = array( )
 
array $mainConfiguration
 
ConfigurationService $configurationService
 

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 29 of file AbstractModule.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 46 of file AbstractModule.php.

Member Function Documentation

◆ getBackendUser()

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

Returns the current BE user.

Returns
‪BackendUserAuthentication|FrontendBackendUserAuthentication

Definition at line 110 of file AbstractModule.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Adminpanel\Modules\EditModule\getPageModule(), and TYPO3\CMS\Adminpanel\Modules\CacheModule\getPageSettings().

◆ getLanguageService()

◆ getSubModules()

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

‪Returns an array of module instances

Returns
‪\TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface[]

Implements TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface.

Definition at line 82 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)

Returns
‪bool

Implements TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface.

Definition at line 90 of file AbstractModule.php.

◆ isEnabled()

bool 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

Returns
‪bool

Implements TYPO3\CMS\Adminpanel\ModuleApi\ConfigurableInterface.

Definition at line 61 of file AbstractModule.php.

References TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface\getIdentifier(), and TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\isEnabledViaTsConfig().

◆ isEnabledViaTsConfig()

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

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

Returns
‪bool

Definition at line 130 of file AbstractModule.php.

References TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface\getIdentifier().

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

◆ setSubModules()

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

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

Parameters
\TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface[]$subModules

Implements TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface.

Definition at line 74 of file AbstractModule.php.

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

Member Data Documentation

◆ $configurationService

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

Definition at line 44 of file AbstractModule.php.

◆ $mainConfiguration

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

Main Configuration (from UserTSConfig, admPanel)

Definition at line 40 of file AbstractModule.php.

◆ $subModules

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