CacheModule
class \
- Extends
- AbstractModule
- Implements
- PageSettingsProviderInterface, RequestEnricherInterface, ResourceProviderInterface
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)
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Interfaces
- PageSettingsProviderInterface
- Adminpanel page settings interface denotes that a module has settings regarding the page rendering.
- RequestEnricherInterface
- Adminpanel interface to denote that a module has tasks to perform on initialization of the request and may enrich said request
- ResourceProviderInterface
- Adminpanel interface to denote that a module has own resource files.
Properties
- $configurationService : ConfigurationService
- $mainConfiguration : array
- Main Configuration (from UserTSConfig, admPanel)
- $moduleData : ModuleDataStorageCollection
- $subModules : ModuleInterface[]
Methods
- __construct() : mixed
- enrich() : ServerRequestInterface
- Initialize the module - runs in the TYPO3 middleware stack at an early point may manipulate the current request
- getCssFiles() : array
- Returns a string array with css files that will be rendered after the module
- getIconIdentifier() : string
- getIdentifier() : string
- Identifier for this module, for example "preview" or "cache"
- getJavaScriptFiles() : array
- Returns a string array with javascript files that will be rendered after the module
- getLabel() : string
- Module label
- getPageSettings() : string
- getSubModules() : ModuleInterface[]
- Returns an array of module instances
- hasSubmoduleSettings() : bool
- Return true if any of the submodules has settings to be rendered (can be used to render settings in a central place)
- injectConfigurationService() : void
- isEnabled() : bool
- Returns true if the module is -> either enabled via TSConfig "admPanel.enable" -> or any setting is overridden.
- setModuleData() : void
- setSubModules() : void
- Sets array of module instances (instances of `ModuleInterface`) as submodules
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- isEnabledViaTsConfig() : bool
- Returns true if TSConfig "admPanel.enable" is set for this module (or all modules)
Properties
$configurationService
protected
ConfigurationService
$configurationService
$mainConfiguration
Main Configuration (from UserTSConfig, admPanel)
protected
array
$mainConfiguration
$moduleData
protected
ModuleDataStorageCollection
$moduleData
$subModules
protected
ModuleInterface[]
$subModules
= []
Methods
__construct()
public
__construct(ViewFactoryInterface $viewFactory) : mixed
Parameters
- $viewFactory : ViewFactoryInterface
enrich()
Initialize the module - runs in the TYPO3 middleware stack at an early point may manipulate the current request
public
enrich(ServerRequestInterface $request) : ServerRequestInterface
Parameters
- $request : ServerRequestInterface
Return values
ServerRequestInterfacegetCssFiles()
Returns a string array with css files that will be rendered after the module
public
getCssFiles() : array
Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.css'];
Return values
arraygetIconIdentifier()
public
getIconIdentifier() : string
Return values
stringgetIdentifier()
Identifier for this module, for example "preview" or "cache"
public
getIdentifier() : string
Return values
stringgetJavaScriptFiles()
Returns a string array with javascript files that will be rendered after the module
public
getJavaScriptFiles() : array
Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.js'];
Return values
arraygetLabel()
Module label
public
getLabel() : string
Return values
stringgetPageSettings()
public
getPageSettings() : string
Return values
stringgetSubModules()
Returns an array of module instances
public
getSubModules() : ModuleInterface[]
Return values
ModuleInterface[]hasSubmoduleSettings()
Return true if any of the submodules has settings to be rendered (can be used to render settings in a central place)
public
hasSubmoduleSettings() : bool
Return values
boolinjectConfigurationService()
public
injectConfigurationService(ConfigurationService $configurationService) : void
Parameters
- $configurationService : ConfigurationService
isEnabled()
Returns true if the module is -> either enabled via TSConfig "admPanel.enable" -> or any setting is overridden.
public
isEnabled() : bool
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
Return values
boolsetModuleData()
public
setModuleData(ModuleDataStorageCollection $moduleData) : void
Parameters
- $moduleData : ModuleDataStorageCollection
setSubModules()
Sets array of module instances (instances of `ModuleInterface`) as submodules
public
setSubModules(array $subModules) : void
Parameters
- $subModules : array
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServiceisEnabledViaTsConfig()
Returns true if TSConfig "admPanel.enable" is set for this module (or all modules)
protected
isEnabledViaTsConfig() : bool