AbstractModule implements ModuleInterface, ConfigurableInterface, SubmoduleProviderInterface
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)
Table of Contents
Interfaces
- ModuleInterface
- Adminpanel interface for all modules
- ConfigurableInterface
- AdminPanel ConfigurableInterface
- SubmoduleProviderInterface
- Adminpanel interface providing hierarchical functionality for modules
Properties
- $configurationService : ConfigurationService
- $mainConfiguration : array<string|int, mixed>
- Main Configuration (from UserTSConfig, admPanel)
- $subModules : array<string|int, ModuleInterface>
Methods
- __construct() : mixed
- 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)
- isEnabled() : bool
- 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
- setSubModules() : void
- Sets array of module instances (instances of `ModuleInterface`) as submodules
- getBackendUser() : BackendUserAuthentication|FrontendBackendUserAuthentication
- Returns the current BE user.
- getLanguageService() : LanguageService
- Returns 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<string|int, mixed>
$mainConfiguration
$subModules
protected
array<string|int, ModuleInterface>
$subModules
= []
Methods
__construct()
public
__construct() : mixed
getSubModules()
Returns an array of module instances
public
getSubModules() : array<string|int, ModuleInterface>
Tags
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
Tags
Return values
boolisEnabled()
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
public
isEnabled() : bool
Return values
boolsetSubModules()
Sets array of module instances (instances of `ModuleInterface`) as submodules
public
setSubModules(array<string|int, mixed> $subModules) : void
Parameters
- $subModules : array<string|int, mixed>
Tags
getBackendUser()
Returns the current BE user.
protected
getBackendUser() : BackendUserAuthentication|FrontendBackendUserAuthentication
Return values
BackendUserAuthentication|FrontendBackendUserAuthenticationgetLanguageService()
Returns LanguageService
protected
getLanguageService() : LanguageService
Return values
LanguageServiceisEnabledViaTsConfig()
Returns true if TSConfig admPanel.enable is set for this module (or all modules)
protected
isEnabledViaTsConfig() : bool