TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\View\ModuleMenuView Class Reference

Public Member Functions

 __construct ()
 
 setBackPath ($backPath)
 
 getModuleData ($params, $ajaxObj)
 
 getLoadedModules ()
 
 saveMenuState ($params, $ajaxObj)
 
 getRawModuleData ()
 
 renderLogoutButton ()
 
 setLinkModules ($linkModules)
 

Protected Member Functions

 getCollapsedStates ()
 
 unsetHiddenModules ()
 
 getModuleIcon ($moduleKey)
 
 getModuleIconAbsolute ($iconFilename)
 
 getModuleIconRelative ($iconFilename)
 
 appendQuestionmarkToLink ($link)
 

Protected Attributes

 $moduleLoader
 
 $backPath
 
 $linkModules
 
 $loadedModules
 

Detailed Description

class to render the TYPO3 backend menu for the modules

Definition at line 23 of file ModuleMenuView.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\View\ModuleMenuView::__construct ( )

Constructor, initializes several variables

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, not in use, as everything can be done via the ModuleMenuRepository directly

Definition at line 51 of file ModuleMenuView.php.

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

Member Function Documentation

◆ appendQuestionmarkToLink()

TYPO3\CMS\Backend\View\ModuleMenuView::appendQuestionmarkToLink (   $link)
protected

Appends a '?' if there is none in the string already

Parameters
string$linkLink URL
Returns
string Link URl appended with ? if there wasn't one

Definition at line 346 of file ModuleMenuView.php.

◆ getCollapsedStates()

TYPO3\CMS\Backend\View\ModuleMenuView::getCollapsedStates ( )
protected

loads the collapse states for the main modules from user's configuration (uc)

Returns
array Collapse states

Definition at line 86 of file ModuleMenuView.php.

References $GLOBALS.

◆ getLoadedModules()

TYPO3\CMS\Backend\View\ModuleMenuView::getLoadedModules ( )

Returns the loaded modules

Returns
array Array of loaded modules

Definition at line 152 of file ModuleMenuView.php.

References TYPO3\CMS\Backend\View\ModuleMenuView\$loadedModules.

◆ getModuleData()

TYPO3\CMS\Backend\View\ModuleMenuView::getModuleData (   $params,
  $ajaxObj 
)

ModuleMenu Store loading data

Parameters
array$params
\TYPO3\CMS\Core\Http\AjaxRequestHandler$ajaxObj
Returns
array

Definition at line 102 of file ModuleMenuView.php.

References $GLOBALS, TYPO3\CMS\Backend\View\ModuleMenuView\getRawModuleData(), and TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

◆ getModuleIcon()

TYPO3\CMS\Backend\View\ModuleMenuView::getModuleIcon (   $moduleKey)
protected

gets the module icon and its size

Parameters
string$moduleKeyModule key
Returns
array Icon data array with 'filename', 'size', and 'html'

Definition at line 283 of file ModuleMenuView.php.

References $GLOBALS, TYPO3\CMS\Backend\View\ModuleMenuView\getModuleIconAbsolute(), and TYPO3\CMS\Backend\View\ModuleMenuView\getModuleIconRelative().

Referenced by TYPO3\CMS\Backend\View\ModuleMenuView\getRawModuleData().

◆ getModuleIconAbsolute()

TYPO3\CMS\Backend\View\ModuleMenuView::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 317 of file ModuleMenuView.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\isAbsPath().

Referenced by TYPO3\CMS\Backend\View\ModuleMenuView\getModuleIcon().

◆ getModuleIconRelative()

TYPO3\CMS\Backend\View\ModuleMenuView::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 332 of file ModuleMenuView.php.

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

Referenced by TYPO3\CMS\Backend\View\ModuleMenuView\getModuleIcon().

◆ getRawModuleData()

TYPO3\CMS\Backend\View\ModuleMenuView::getRawModuleData ( )

◆ renderLogoutButton()

TYPO3\CMS\Backend\View\ModuleMenuView::renderLogoutButton ( )

renders the logout button form

Returns
string Html code snippet displaying the logout button

Definition at line 359 of file ModuleMenuView.php.

References $GLOBALS.

◆ saveMenuState()

TYPO3\CMS\Backend\View\ModuleMenuView::saveMenuState (   $params,
  $ajaxObj 
)

saves the menu's toggle state in the backend user's uc

Parameters
array$paramsArray of parameters from the AJAX interface, currently unused
\TYPO3\CMS\Core\Http\AjaxRequestHandler$ajaxObjObject of type AjaxRequestHandler
Returns
void

Definition at line 164 of file ModuleMenuView.php.

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

◆ setBackPath()

TYPO3\CMS\Backend\View\ModuleMenuView::setBackPath (   $backPath)

sets the path back to /typo3/

Parameters
string$backPathPath back to /typo3/
Exceptions

Definition at line 73 of file ModuleMenuView.php.

References TYPO3\CMS\Backend\View\ModuleMenuView\$backPath.

◆ setLinkModules()

TYPO3\CMS\Backend\View\ModuleMenuView::setLinkModules (   $linkModules)

turns linking of modules on or off

Parameters
bool$linkModulesStatus for linking modules with a-tags, set to FALSE to turn lining off
Exceptions

Definition at line 376 of file ModuleMenuView.php.

References TYPO3\CMS\Backend\View\ModuleMenuView\$linkModules.

◆ unsetHiddenModules()

TYPO3\CMS\Backend\View\ModuleMenuView::unsetHiddenModules ( )
protected

Reads User configuration from options.hideModules and removes modules from $this->loadedModules accordingly.

Returns
void

Definition at line 178 of file ModuleMenuView.php.

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

Referenced by TYPO3\CMS\Backend\View\ModuleMenuView\getRawModuleData().

Member Data Documentation

◆ $backPath

TYPO3\CMS\Backend\View\ModuleMenuView::$backPath
protected

◆ $linkModules

TYPO3\CMS\Backend\View\ModuleMenuView::$linkModules
protected

◆ $loadedModules

TYPO3\CMS\Backend\View\ModuleMenuView::$loadedModules
protected

◆ $moduleLoader

TYPO3\CMS\Backend\View\ModuleMenuView::$moduleLoader
protected

Definition at line 30 of file ModuleMenuView.php.