TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
 loadAllowedModules (array $excludeGroupNames=[])
 
 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()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::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.

References TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\getLanguageService(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\__construct().

◆ createMenuEntriesForTbeModulesExt()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::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 TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\findByModuleName().

Referenced by TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\__construct().

◆ findByGroupName()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::findByGroupName (   $groupName = '')
Parameters
string$groupName
Returns
|FALSE

Definition at line 74 of file BackendModuleRepository.php.

◆ findByModuleName()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::findByModuleName (   $name)

◆ findByModuleNameInGivenEntries()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::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 TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\findByModuleName().

◆ getLanguageService()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::getLanguageService ( )
protected

Return language service instance

Returns

Definition at line 224 of file BackendModuleRepository.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\convertRawModuleDataToModuleMenuObject().

◆ getModuleIcon()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::getModuleIcon (   $moduleKey,
  $moduleData 
)
protected

◆ getModuleIconAbsolute()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::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 379 of file BackendModuleRepository.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\isAbsPath().

Referenced by TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\getModuleIcon().

◆ getModuleIconRelative()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::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 394 of file BackendModuleRepository.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\isAbsPath(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\getModuleIcon().

◆ getRawModuleMenuData()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::getRawModuleMenuData ( )

◆ loadAllowedModules()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::loadAllowedModules ( array  $excludeGroupNames = [])

loads all module information in the module storage

Parameters
array$excludeGroupNames
Returns

Definition at line 52 of file BackendModuleRepository.php.

◆ removeHiddenModules()

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::removeHiddenModules (   $loadedModules)
protected

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

Parameters
array$loadedModules
Returns
array

Definition at line 318 of file BackendModuleRepository.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository\getRawModuleMenuData().

Member Data Documentation

◆ $moduleStorage

TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository::$moduleStorage
protected

Definition at line 31 of file BackendModuleRepository.php.