BackendModuleRepository
class \
- 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
- 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
- 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
Return values
arrayloadAllowedModules()
loads all module information in the module storage
public
loadAllowedModules([array $excludeGroupNames = [] ]) : SplObjectStorage
Parameters
- $excludeGroupNames : array = []
Return values
SplObjectStoragemodulesHaveNavigationComponent()
public
modulesHaveNavigationComponent() : bool
Tags
Return values
boolconvertRawModuleDataToModuleMenuObject()
Creates the module menu object structure from the raw data array
protected
convertRawModuleDataToModuleMenuObject(array $rawModuleData) : mixed
Parameters
- $rawModuleData : array
createEntryFromRawData()
Creates a menu entry object from an array
protected
createEntryFromRawData(array $module) : BackendModule
Parameters
- $module : array
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 $moduleData) : string
Parameters
- $moduleKey : string
-
Module key
- $moduleData : array
-
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 $loadedModules) : array
Parameters
- $loadedModules : array