‪TYPO3CMS  11.5
TYPO3\CMS\Info\Controller\InfoModuleController Class Reference

Public Member Functions

 __construct (IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, FlashMessageService $flashMessageService, ContainerInterface $container, ModuleTemplateFactory $moduleTemplateFactory)
ResponseInterface mainAction (ServerRequestInterface $request)

Public Attributes

array $pageinfo = array( )
array $MOD_MENU
array $MOD_SETTINGS = array( )

Protected Member Functions

 init (ServerRequestInterface $request)
 main (ServerRequestInterface $request)
 getButtons (ServerRequestInterface $request)
 generateMenu ()
StandaloneView getFluidTemplateObject ()
 menuConfig (ServerRequestInterface $request)
array mergeExternalItems ($modName, $menuKey, $menuArr)
 handleExternalFunctionValue ($MM_key='function', $MS_value=null)
mixed getExternalItemConfig ($modName, $menuKey, $value='')
 checkExtObj (ServerRequestInterface $request)
 extObjContent (ServerRequestInterface $request)
LanguageService getLanguageService ()
BackendUserAuthentication getBackendUser ()

Protected Attributes

string $moduleName = 'web_info'
ModuleTemplate $moduleTemplate
StandaloneView $view
string $perms_clause
array $modTSconfig
string $modMenu_type = ''
string $modMenu_dontValidateList = ''
string $modMenu_setDefaultList = ''
array $extClassConf
string $content = ''
object $extObj
IconFactory $iconFactory
PageRenderer $pageRenderer
UriBuilder $uriBuilder
FlashMessageService $flashMessageService
ContainerInterface $container
ModuleTemplateFactory $moduleTemplateFactory

Detailed Description

Script Class for the Web > Info module This class creates the framework to which other extensions can connect their sub-modules

This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.

Definition at line 44 of file InfoModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ checkExtObj()

TYPO3\CMS\Info\Controller\InfoModuleController::checkExtObj ( ServerRequestInterface  $request)

Creates an instance of the class found in $this->extClassConf['name'] in $this->extObj if any (this should hold three keys, "name", "path" and "title" if a "Function menu module" tries to connect...) This value in extClassConf might be set by an extension (in an ext_tables/ext_localconf file) which thus "connects" to a module. The array $this->extClassConf is set in handleExternalFunctionValue() based on the value of MOD_SETTINGS[function] If an instance is created it is initiated with $this passed as value and $this->extClassConf as second argument. Further the $this->MOD_SETTING is cleaned up again after calling the init function.

Definition at line 415 of file InfoModuleController.php.

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\mainAction().

◆ extObjContent()

TYPO3\CMS\Info\Controller\InfoModuleController::extObjContent ( ServerRequestInterface  $request)

Calls the 'main' function inside the "Function menu module" if present

Definition at line 435 of file InfoModuleController.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Info\Controller\InfoModuleController\getLanguageService().

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\main().

◆ generateMenu()

TYPO3\CMS\Info\Controller\InfoModuleController::generateMenu ( )

Generate the ModuleMenu

Definition at line 285 of file InfoModuleController.php.

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\main().

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Info\Controller\InfoModuleController::getBackendUser ( )

◆ getButtons()

TYPO3\CMS\Info\Controller\InfoModuleController::getButtons ( ServerRequestInterface  $request)

◆ getExternalItemConfig()

mixed TYPO3\CMS\Info\Controller\InfoModuleController::getExternalItemConfig (   $modName,
  $value = '' 

Returns configuration values from the global variable $TBE_MODULES_EXT for the module given. For example if the module is named "web_info" and the "function" key ($menuKey) of MOD_SETTINGS is "stat" ($value) then you will have the values of $TBE_MODULES_EXT['webinfo']['MOD_MENU']['function']['stat'] returned.

string$modName‪Module name
string$menuKey‪Menu key, eg. "function" for the function menu. See $this->MOD_MENU
string$value‪Optionally the value-key to fetch from the array that would otherwise have been returned if this value was not set. Look source...
‪mixed The value from the TBE_MODULES_EXT array.

Definition at line 399 of file InfoModuleController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\handleExternalFunctionValue().

◆ getFluidTemplateObject()

◆ getLanguageService()

◆ handleExternalFunctionValue()

TYPO3\CMS\Info\Controller\InfoModuleController::handleExternalFunctionValue (   $MM_key = 'function',
  $MS_value = null 

Loads $this->extClassConf with the configuration for the CURRENT function of the menu.

string$MM_key‪The key to MOD_MENU for which to fetch configuration. 'function' is default since it is first and foremost used to get information per "extension object" (I think that is what its called)
string$MS_value‪The value-key to fetch from the config array. If NULL (default) MOD_SETTINGS[$MM_key] will be used. This is useful if you want to force another function than the one defined in MOD_SETTINGS[function]. Call this in init() function of your Script Class: handleExternalFunctionValue('function', $forcedSubModKey)

Definition at line 381 of file InfoModuleController.php.

References TYPO3\CMS\Info\Controller\InfoModuleController\getExternalItemConfig().

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\init().

◆ init()

◆ main()

◆ mainAction()

ResponseInterface TYPO3\CMS\Info\Controller\InfoModuleController::mainAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest Then checks for module functions that have hooked in, and renders menu etc.

ServerRequestInterface$request‪the current request
‪ResponseInterface the response with the content

Definition at line 222 of file InfoModuleController.php.

References TYPO3\CMS\Info\Controller\InfoModuleController\checkExtObj(), TYPO3\CMS\Info\Controller\InfoModuleController\init(), and TYPO3\CMS\Info\Controller\InfoModuleController\main().

◆ menuConfig()

TYPO3\CMS\Info\Controller\InfoModuleController::menuConfig ( ServerRequestInterface  $request)

Initializes the internal MOD_MENU array setting and unsetting items based on various conditions. It also merges in external menu items from the global array TBE_MODULES_EXT (see mergeExternalItems()) Then MOD_SETTINGS array is cleaned up (see \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()) so it contains only valid values. It's also updated with any SET[] values submitted. Also loads the modTSconfig internal variable.

Definition at line 335 of file InfoModuleController.php.

References TYPO3\CMS\Info\Controller\InfoModuleController\mergeExternalItems().

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\init().

◆ mergeExternalItems()

array TYPO3\CMS\Info\Controller\InfoModuleController::mergeExternalItems (   $modName,

Merges menu items from global array $TBE_MODULES_EXT

string$modName‪Module name for which to find value
string$menuKey‪Menu key, eg. 'function' for the function menu.
array$menuArr‪The part of a MOD_MENU array to work on.
‪array Modified array part.

Definition at line 359 of file InfoModuleController.php.

References $GLOBALS, TYPO3\CMS\Info\Controller\InfoModuleController\getBackendUser(), TYPO3\CMS\Info\Controller\InfoModuleController\getLanguageService(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

Referenced by TYPO3\CMS\Info\Controller\InfoModuleController\menuConfig().

Member Data Documentation

◆ $container

ContainerInterface TYPO3\CMS\Info\Controller\InfoModuleController::$container

◆ $content

string TYPO3\CMS\Info\Controller\InfoModuleController::$content = ''

Generally used for accumulating the output content of backend modules

Definition at line 128 of file InfoModuleController.php.

◆ $extClassConf

array TYPO3\CMS\Info\Controller\InfoModuleController::$extClassConf

Contains module configuration parts from TBE_MODULES_EXT if found

Definition at line 122 of file InfoModuleController.php.

◆ $extObj

object TYPO3\CMS\Info\Controller\InfoModuleController::$extObj

May contain an instance of a 'Function menu module' which connects to this backend module.

Definition at line 134 of file InfoModuleController.php.

◆ $flashMessageService

FlashMessageService TYPO3\CMS\Info\Controller\InfoModuleController::$flashMessageService

◆ $iconFactory

IconFactory TYPO3\CMS\Info\Controller\InfoModuleController::$iconFactory

◆ $id


Definition at line 69 of file InfoModuleController.php.


array TYPO3\CMS\Info\Controller\InfoModuleController::$MOD_MENU
Initial value:
= array(
'function' => [],

The module menu items array. Each key represents a key for which values can range between the items in the array of that key. Written by client classes.

Definition at line 82 of file InfoModuleController.php.


array TYPO3\CMS\Info\Controller\InfoModuleController::$MOD_SETTINGS = array( )

Current settings for the keys of the MOD_MENU array Written by client classes.

Definition at line 91 of file InfoModuleController.php.

◆ $modMenu_dontValidateList

string TYPO3\CMS\Info\Controller\InfoModuleController::$modMenu_dontValidateList = ''

dontValidateList can be used to list variables that should not be checked if their value is found in the MOD_MENU array. Used for dynamically generated menus. Can be set from extension classes of this class before the init() function is called.

Definition at line 111 of file InfoModuleController.php.

◆ $modMenu_setDefaultList

string TYPO3\CMS\Info\Controller\InfoModuleController::$modMenu_setDefaultList = ''

List of default values from $MOD_MENU to set in the output array (only if the values from MOD_MENU are not arrays) Can be set from extension classes of this class before the init() function is called.

Definition at line 118 of file InfoModuleController.php.

◆ $modMenu_type

string TYPO3\CMS\Info\Controller\InfoModuleController::$modMenu_type = ''

If type is 'ses' then the data is stored as session-lasting data. This means that it'll be wiped out the next time the user logs in. Can be set from extension classes of this class before the init() function is called.

Definition at line 104 of file InfoModuleController.php.

◆ $modTSconfig

array TYPO3\CMS\Info\Controller\InfoModuleController::$modTSconfig

Module TSconfig based on PAGE TSconfig / USER TSconfig

Definition at line 97 of file InfoModuleController.php.

◆ $moduleName

string TYPO3\CMS\Info\Controller\InfoModuleController::$moduleName = 'web_info'

The name of the module

Definition at line 54 of file InfoModuleController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Info\Controller\InfoModuleController::$moduleTemplate

ModuleTemplate Container

Definition at line 60 of file InfoModuleController.php.

◆ $moduleTemplateFactory

ModuleTemplateFactory TYPO3\CMS\Info\Controller\InfoModuleController::$moduleTemplateFactory

◆ $pageinfo

array TYPO3\CMS\Info\Controller\InfoModuleController::$pageinfo = array( )

Used by client classes.

Definition at line 48 of file InfoModuleController.php.

◆ $pageRenderer

PageRenderer TYPO3\CMS\Info\Controller\InfoModuleController::$pageRenderer

◆ $perms_clause

string TYPO3\CMS\Info\Controller\InfoModuleController::$perms_clause

A WHERE clause for selection records from the pages table based on read-permissions of the current backend user.

Definition at line 75 of file InfoModuleController.php.

◆ $uriBuilder

UriBuilder TYPO3\CMS\Info\Controller\InfoModuleController::$uriBuilder

◆ $view

StandaloneView TYPO3\CMS\Info\Controller\InfoModuleController::$view