BackendModuleRepository implements SingletonInterface
Repository for backend module menu compiles all data from $GLOBALS[TBE_MODULES]
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
Methods
- __construct() : mixed
- Constructs the module menu and gets the Singleton instance of the menu
- findByGroupName() : SplObjectStorage|false
- findByModuleName() : BackendModule|false
- Finds a module menu entry by name
- findByModuleNameInGivenEntries() : BackendModule|false
- Finds a module menu entry by name in a given storage
- getRawModuleMenuData() : array<string|int, mixed>
- loads the module menu from the moduleloader based on $GLOBALS['TBE_MODULES'] and compiles an array with all the data needed for menu etc.
- loadAllowedModules() : SplObjectStorage
- loads all module information in the module storage
- modulesHaveNavigationComponent() : bool
- convertRawModuleDataToModuleMenuObject() : mixed
- Creates the module menu object structure from the raw data array
- createEntryFromRawData() : BackendModule
- Creates a menu entry object from an array
- createMenuEntriesForTbeModulesExt() : mixed
- Creates the "third level" menu entries (submodules for the info module for example) from the TBE_MODULES_EXT array
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- Return language service instance
- getModuleIcon() : string
- gets the module icon
- removeHiddenModules() : array<string|int, mixed>
- Reads User configuration from options.hideModules and removes modules accordingly.
Properties
$moduleStorage
protected
ModuleStorage
$moduleStorage
Methods
__construct()
Constructs the module menu and gets the Singleton instance of the menu
public
__construct() : mixed
findByGroupName()
public
findByGroupName([string $groupName = '' ]) : SplObjectStorage|false
Parameters
- $groupName : string = ''
Return values
SplObjectStorage|falsefindByModuleName()
Finds a module menu entry by name
public
findByModuleName(string $name) : BackendModule|false
Parameters
- $name : string
Return values
BackendModule|falsefindByModuleNameInGivenEntries()
Finds a module menu entry by name in a given storage
public
findByModuleNameInGivenEntries(string $name, SplObjectStorage $entries) : BackendModule|false
Parameters
- $name : string
- $entries : SplObjectStorage
Return values
BackendModule|falsegetRawModuleMenuData()
loads the module menu from the moduleloader based on $GLOBALS['TBE_MODULES'] and compiles an array with all the data needed for menu etc.
public
getRawModuleMenuData() : array<string|int, mixed>
Return values
array<string|int, mixed>loadAllowedModules()
loads all module information in the module storage
public
loadAllowedModules([array<string|int, mixed> $excludeGroupNames = [] ]) : SplObjectStorage
Parameters
- $excludeGroupNames : array<string|int, mixed> = []
Return values
SplObjectStoragemodulesHaveNavigationComponent()
public
modulesHaveNavigationComponent() : bool
Tags
Return values
boolconvertRawModuleDataToModuleMenuObject()
Creates the module menu object structure from the raw data array
protected
convertRawModuleDataToModuleMenuObject(array<string|int, mixed> $rawModuleData) : mixed
Parameters
- $rawModuleData : array<string|int, mixed>
createEntryFromRawData()
Creates a menu entry object from an array
protected
createEntryFromRawData(array<string|int, mixed> $module) : BackendModule
Parameters
- $module : array<string|int, mixed>
Return values
BackendModulecreateMenuEntriesForTbeModulesExt()
Creates the "third level" menu entries (submodules for the info module for example) from the TBE_MODULES_EXT array
protected
createMenuEntriesForTbeModulesExt() : mixed
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
Return language service instance
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetModuleIcon()
gets the module icon
protected
getModuleIcon(string $moduleKey, array<string|int, mixed> $moduleData) : string
Parameters
- $moduleKey : string
-
Module key
- $moduleData : array<string|int, mixed>
-
the compiled data associated with it
Return values
string —Icon data, either sprite or tag
removeHiddenModules()
Reads User configuration from options.hideModules and removes modules accordingly.
protected
removeHiddenModules(array<string|int, mixed> $loadedModules) : array<string|int, mixed>
Parameters
- $loadedModules : array<string|int, mixed>