TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BackendModuleRepository Class Reference
Inheritance diagram for BackendModuleRepository:
SingletonInterface

Public Member Functions

 __construct ()
 
 loadAllowedModules (array $excludeGroupNames=array())
 
 findByGroupName ($groupName= '')
 
 findByModuleName ($name)
 
 findByModuleNameInGivenEntries ($name,\SplObjectStorage $entries)
 
 getRawModuleMenuData ()
 

Protected Member Functions

 convertRawModuleDataToModuleMenuObject (array $rawModuleData)
 
 createMenuEntriesForTbeModulesExt ()
 
 getLanguageService ()
 
 removeHiddenModules ($loadedModules)
 
 getModuleIcon ($moduleKey, $moduleData)
 
 getModuleIconAbsolute ($iconFilename)
 
 getModuleIconRelative ($iconFilename)
 

Protected Attributes

 $moduleStorage
 

Detailed Description

Repository for backend module menu compiles all data from $GLOBALS[TBE_MODULES]

Definition at line 26 of file BackendModuleRepository.php.

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

convertRawModuleDataToModuleMenuObject ( array  $rawModuleData)
protected

Creates the module menu object structure from the raw data array

Parameters
array$rawModuleData
Returns
void

Definition at line 128 of file BackendModuleRepository.php.

Referenced by BackendModuleRepository\__construct().

createMenuEntriesForTbeModulesExt ( )
protected

Creates the "third level" menu entries (submodules for the info module for example) from the TBE_MODULES_EXT array

Returns
void

Definition at line 192 of file BackendModuleRepository.php.

References $GLOBALS, and BackendModuleRepository\findByModuleName().

Referenced by BackendModuleRepository\__construct().

findByGroupName (   $groupName = '')
Parameters
string$groupName
Returns
|FALSE

Definition at line 74 of file BackendModuleRepository.php.

findByModuleName (   $name)

Finds a module menu entry by name

Parameters
string$name
Returns
|boolean

Definition at line 91 of file BackendModuleRepository.php.

References BackendModuleRepository\findByModuleNameInGivenEntries().

Referenced by BackendModuleRepository\createMenuEntriesForTbeModulesExt().

findByModuleNameInGivenEntries (   $name,
\SplObjectStorage  $entries 
)

Finds a module menu entry by name in a given storage

Parameters
string$name
\SplObjectStorage$entries
Returns
|bool

Definition at line 105 of file BackendModuleRepository.php.

Referenced by BackendModuleRepository\findByModuleName().

getLanguageService ( )
protected

Return language service instance

Returns

Definition at line 222 of file BackendModuleRepository.php.

References $GLOBALS.

getModuleIcon (   $moduleKey,
  $moduleData 
)
protected

gets the module icon and its size

Parameters
string$moduleKeyModule key
array$moduleDatathe compiled data associated with it
Returns
string Icon data, either sprite or tag

Definition at line 348 of file BackendModuleRepository.php.

References $GLOBALS, elseif, BackendModuleRepository\getModuleIconAbsolute(), BackendModuleRepository\getModuleIconRelative(), and GeneralUtility\makeInstance().

Referenced by BackendModuleRepository\getRawModuleMenuData().

getModuleIconAbsolute (   $iconFilename)
protected

Returns the filename readable for the script from PATH_typo3. That means absolute names are just returned while relative names are prepended with the path pointing back to typo3/ dir

Parameters
string$iconFilenameIcon filename
Returns
string Icon filename with absolute path
See Also
getModuleIconRelative()

Definition at line 377 of file BackendModuleRepository.php.

References $GLOBALS, and GeneralUtility\isAbsPath().

Referenced by BackendModuleRepository\getModuleIcon().

getModuleIconRelative (   $iconFilename)
protected

Returns relative path to the icon filename for use in img-tags

Parameters
string$iconFilenameIcon filename
Returns
string Icon filename with relative path
See Also
getModuleIconAbsolute()

Definition at line 392 of file BackendModuleRepository.php.

References GeneralUtility\isAbsPath().

Referenced by BackendModuleRepository\getModuleIcon().

getRawModuleMenuData ( )

loads the module menu from the moduleloader based on $GLOBALS['TBE_MODULES'] and compiles an array with all the data needed for menu etc.

Returns
array

Definition at line 233 of file BackendModuleRepository.php.

References $GLOBALS, elseif, BackendModuleRepository\getModuleIcon(), GeneralUtility\makeInstance(), GeneralUtility\quoteJSvalue(), BackendModuleRepository\removeHiddenModules(), and GeneralUtility\resolveBackPath().

Referenced by BackendModuleRepository\__construct().

loadAllowedModules ( array  $excludeGroupNames = array())

loads all module information in the module storage

Parameters
array$excludeGroupNames
Returns

Definition at line 52 of file BackendModuleRepository.php.

removeHiddenModules (   $loadedModules)
protected

Reads User configuration from options.hideModules and removes modules accordingly.

Parameters
array$loadedModules
Returns
array

Definition at line 316 of file BackendModuleRepository.php.

References $GLOBALS.

Referenced by BackendModuleRepository\getRawModuleMenuData().

Member Data Documentation

$moduleStorage
protected

Definition at line 31 of file BackendModuleRepository.php.