TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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 ( )

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, GeneralUtility\logDeprecatedFunction(), and GeneralUtility\makeInstance().

Member Function Documentation

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 ( )
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 ( )

Returns the loaded modules

Returns
array Array of loaded modules

Definition at line 152 of file ModuleMenuView.php.

References ModuleMenuView\$loadedModules.

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, ModuleMenuView\getRawModuleData(), and GeneralUtility\quoteJSvalue().

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, ModuleMenuView\getModuleIconAbsolute(), and ModuleMenuView\getModuleIconRelative().

Referenced by ModuleMenuView\getRawModuleData().

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 GeneralUtility\isAbsPath().

Referenced by ModuleMenuView\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 332 of file ModuleMenuView.php.

References GeneralUtility\isAbsPath().

Referenced by ModuleMenuView\getModuleIcon().

getRawModuleData ( )

gets the raw module data

Returns
array Multi dimension array with module data

Definition at line 205 of file ModuleMenuView.php.

References $GLOBALS, elseif, ModuleMenuView\getModuleIcon(), GeneralUtility\quoteJSvalue(), GeneralUtility\resolveBackPath(), and ModuleMenuView\unsetHiddenModules().

Referenced by ModuleMenuView\getModuleData().

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 (   $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 GeneralUtility\_POST().

setBackPath (   $backPath)

sets the path back to /typo3/

Parameters
string$backPathPath back to /typo3/
Exceptions
\InvalidArgumentException
Returns
void

Definition at line 73 of file ModuleMenuView.php.

References ModuleMenuView\$backPath.

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
\InvalidArgumentException
Returns
void

Definition at line 376 of file ModuleMenuView.php.

References ModuleMenuView\$linkModules.

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 GeneralUtility\trimExplode().

Referenced by ModuleMenuView\getRawModuleData().

Member Data Documentation

$backPath
protected

Definition at line 35 of file ModuleMenuView.php.

Referenced by ModuleMenuView\setBackPath().

$linkModules
protected

Definition at line 40 of file ModuleMenuView.php.

Referenced by ModuleMenuView\setLinkModules().

$loadedModules
protected

Definition at line 45 of file ModuleMenuView.php.

Referenced by ModuleMenuView\getLoadedModules().

$moduleLoader
protected

Definition at line 30 of file ModuleMenuView.php.