PreviewModule extends AbstractModule implements RequestEnricherInterface, PageSettingsProviderInterface, ResourceProviderInterface, OnSubmitActorInterface, LoggerAwareInterface uses LoggerAwareTrait
Admin Panel Preview Module
Table of Contents
Interfaces
- RequestEnricherInterface
- Adminpanel interface to denote that a module has tasks to perform on initialization of the request and may enrich said request
- PageSettingsProviderInterface
- Adminpanel page settings interface denotes that a module has settings regarding the page rendering.
- ResourceProviderInterface
- Adminpanel interface to denote that a module has own resource files.
- OnSubmitActorInterface
- Adminpanel interface for modules that need to react on changed configuration (for example if fluid debug settings change, the frontend cache should be cleared)
- LoggerAwareInterface
Properties
- $cacheManager : CacheManager
- $config : array{showHiddenPages?: bool, simulateDate?: int, showHiddenRecords?: bool, showScheduledRecords?: bool, simulateUserGroup?: int, showFluidDebug?: bool}
- module configuration, set on initialize
- $configurationService : ConfigurationService
- $mainConfiguration : array<string|int, mixed>
- Main Configuration (from UserTSConfig, admPanel)
- $moduleData : ModuleDataStorageCollection
- $subModules : array<string|int, ModuleInterface>
Methods
- enrich() : ServerRequestInterface
- Initialize the module - runs in the TYPO3 middleware stack at an early point may manipulate the current request
- getCssFiles() : array<string|int, mixed>
- 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<string|int, mixed>
- Returns a string array with javascript files that will be rendered after the module
- getLabel() : string
- Module label
- getPageSettings() : string
- getSubModules() : array<string|int, 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)
- injectCacheManager() : void
- injectConfigurationService() : void
- isEnabled() : bool
- Returns true if the module is -> either enabled via TSConfig "admPanel.enable" -> or any setting is overridden.
- onSubmit() : void
- Executed on saving / submit of the configuration form Can be used to react to changed settings (for example: clearing a specific cache)
- setModuleData() : void
- setSubModules() : void
- Sets array of module instances (instances of `ModuleInterface`) as submodules
- clearPreviewSettings() : void
- getBackendUser() : BackendUserAuthentication
- getConfigOptionForModule() : string
- getLanguageService() : LanguageService
- initializeFrontendPreview() : void
- Initialize frontend preview functionality incl.
- isEnabledViaTsConfig() : bool
- Returns true if TSConfig "admPanel.enable" is set for this module (or all modules)
Properties
$cacheManager
protected
CacheManager
$cacheManager
$config
module configuration, set on initialize
protected
array{showHiddenPages?: bool, simulateDate?: int, showHiddenRecords?: bool, showScheduledRecords?: bool, simulateUserGroup?: int, showFluidDebug?: bool}
$config
$configurationService
protected
ConfigurationService
$configurationService
$mainConfiguration
Main Configuration (from UserTSConfig, admPanel)
protected
array<string|int, mixed>
$mainConfiguration
$moduleData
protected
ModuleDataStorageCollection
$moduleData
$subModules
protected
array<string|int, ModuleInterface>
$subModules
= []
Methods
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<string|int, mixed>
Return values
array<string|int, mixed>getIconIdentifier()
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<string|int, mixed>
Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.js'];
Return values
array<string|int, mixed>getLabel()
Module label
public
getLabel() : string
Return values
stringgetPageSettings()
public
getPageSettings() : string
Return values
stringgetSubModules()
Returns an array of module instances
public
getSubModules() : array<string|int, ModuleInterface>
Return values
array<string|int, 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
boolinjectCacheManager()
public
injectCacheManager(CacheManager $cacheManager) : void
Parameters
- $cacheManager : CacheManager
injectConfigurationService()
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
boolonSubmit()
Executed on saving / submit of the configuration form Can be used to react to changed settings (for example: clearing a specific cache)
public
onSubmit(array<string|int, mixed> $configurationToSave, ServerRequestInterface $request) : void
Parameters
- $configurationToSave : array<string|int, mixed>
- $request : ServerRequestInterface
setModuleData()
public
setModuleData(ModuleDataStorageCollection $moduleData) : void
Parameters
- $moduleData : ModuleDataStorageCollection
setSubModules()
Sets array of module instances (instances of `ModuleInterface`) as submodules
public
setSubModules(array<string|int, mixed> $subModules) : void
Parameters
- $subModules : array<string|int, mixed>
clearPreviewSettings()
protected
clearPreviewSettings(Context $context) : void
Parameters
- $context : Context
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetConfigOptionForModule()
protected
getConfigOptionForModule(string $option) : string
Parameters
- $option : string
Return values
stringgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServiceinitializeFrontendPreview()
Initialize frontend preview functionality incl.
protected
initializeFrontendPreview(bool $showHiddenPages, bool $showHiddenRecords, bool $showScheduledRecords, int $simulateDate, int $simulateUserGroup, ServerRequestInterface $request) : void
simulation of users or time
Parameters
- $showHiddenPages : bool
- $showHiddenRecords : bool
- $showScheduledRecords : bool
- $simulateDate : int
- $simulateUserGroup : int
- $request : ServerRequestInterface
Tags
isEnabledViaTsConfig()
Returns true if TSConfig "admPanel.enable" is set for this module (or all modules)
protected
isEnabledViaTsConfig() : bool