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

Public Member Functions

 __construct (ModuleTemplate $moduleTemplate, UriBuilder $uriBuilder, FlashMessageService $flashMessageService, ContainerInterface $container)
 
ResponseInterface mainAction (ServerRequestInterface $request)
 

Public Attributes

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

Protected Member Functions

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

Protected Attributes

string $moduleName = 'web_info'
 
ModuleTemplate $moduleTemplate
 
StandaloneView $view
 
UriBuilder $uriBuilder
 
FlashMessageService $flashMessageService
 
ContainerInterface $container
 
 $id
 
string $perms_clause
 
array $modTSconfig
 
string $modMenu_type = ''
 
string $modMenu_dontValidateList = ''
 
string $modMenu_setDefaultList = ''
 
array $extClassConf
 
string $content = ''
 
object $extObj
 

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 40 of file InfoModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ checkExtObj()

TYPO3\CMS\Info\Controller\InfoModuleController::checkExtObj ( )
protected

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 413 of file InfoModuleController.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData().

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

◆ extObjContent()

TYPO3\CMS\Info\Controller\InfoModuleController::extObjContent ( )
protected

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

Definition at line 432 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\getExtObjContent().

◆ generateMenu()

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

Generate the ModuleMenu

Definition at line 283 of file InfoModuleController.php.

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

◆ getBackendUser()

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

◆ getButtons()

◆ getExternalItemConfig()

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

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.

Parameters
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...
Returns
‪mixed The value from the TBE_MODULES_EXT array.

Definition at line 397 of file InfoModuleController.php.

References $GLOBALS.

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

◆ getExtObjContent()

string TYPO3\CMS\Info\Controller\InfoModuleController::getExtObjContent ( )
protected

Return the content of the 'main' function inside the "Function menu module" if present

Returns
‪string

Definition at line 463 of file InfoModuleController.php.

References TYPO3\CMS\Info\Controller\InfoModuleController\$content, and TYPO3\CMS\Info\Controller\InfoModuleController\extObjContent().

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

◆ getFluidTemplateObject()

◆ getLanguageService()

◆ handleExternalFunctionValue()

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

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

Parameters
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 379 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.

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

Definition at line 221 of file InfoModuleController.php.

References $GLOBALS, 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 ( )
protected

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 333 of file InfoModuleController.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData(), TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig(), and TYPO3\CMS\Info\Controller\InfoModuleController\mergeExternalItems().

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

◆ mergeExternalItems()

array TYPO3\CMS\Info\Controller\InfoModuleController::mergeExternalItems (   $modName,
  $menuKey,
  $menuArr 
)
protected

Merges menu items from global array $TBE_MODULES_EXT

Parameters
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.
Returns
‪array Modified array part.

Definition at line 356 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
protected

◆ $content

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

Generally used for accumulating the output content of backend modules

Definition at line 136 of file InfoModuleController.php.

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

◆ $extClassConf

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

Contains module configuration parts from TBE_MODULES_EXT if found

Definition at line 130 of file InfoModuleController.php.

◆ $extObj

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

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

Definition at line 142 of file InfoModuleController.php.

◆ $flashMessageService

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

◆ $id

TYPO3\CMS\Info\Controller\InfoModuleController::$id
protected

Definition at line 77 of file InfoModuleController.php.

◆ $MOD_MENU

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 90 of file InfoModuleController.php.

◆ $MOD_SETTINGS

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 99 of file InfoModuleController.php.

◆ $modMenu_dontValidateList

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

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 119 of file InfoModuleController.php.

◆ $modMenu_setDefaultList

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

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 126 of file InfoModuleController.php.

◆ $modMenu_type

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

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 112 of file InfoModuleController.php.

◆ $modTSconfig

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

Module TSconfig based on PAGE TSconfig / USER TSconfig

Definition at line 105 of file InfoModuleController.php.

◆ $moduleName

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

The name of the module

Definition at line 50 of file InfoModuleController.php.

◆ $moduleTemplate

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

ModuleTemplate Container

Definition at line 56 of file InfoModuleController.php.

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

◆ $pageinfo

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

Used by client classes.

Definition at line 44 of file InfoModuleController.php.

◆ $perms_clause

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

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

Definition at line 83 of file InfoModuleController.php.

◆ $uriBuilder

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

◆ $view

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