‪TYPO3CMS  9.5
TYPO3\CMS\Taskcenter\Controller\TaskModuleController Class Reference
Inheritance diagram for TYPO3\CMS\Taskcenter\Controller\TaskModuleController:
TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait

Public Member Functions

 __construct ()
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
string description ($title, $description='')
 
string renderListMenu ($items, $mainMenu=false)
 
ModuleTemplate getModuleTemplate ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
bool __isset (string $propertyName)
 
mixed __get (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __unset (string $propertyName)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
mixed __call (string $methodName, array $arguments)
 

Public Attributes

array $MOD_SETTINGS = array( )
 
array $modTSconfig
 

Protected Member Functions

 menuConfig ()
 
 generateMenu ()
 
 main ()
 
 renderModuleContent ()
 
 renderInformationContent ()
 
string indexAction ()
 
 getButtons ()
 
bool checkAccess ($extKey, $taskClass)
 
string urlInIframe ($url)
 
string getUniqueKey ($string)
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
array mergeExternalItems ($modName, $menuKey, $menuArr)
 
 handleExternalFunctionValue ($MM_key='function', $MS_value=null)
 
mixed getExternalItemConfig ($modName, $menuKey, $value='')
 
 checkExtObj ()
 
 checkSubExtObj ()
 
 extObjHeader ()
 
 extObjContent ()
 
string getExtObjContent ()
 
PageRenderer getPageRenderer ()
 

Protected Attributes

array $MCONF = array( )
 
int $id
 
mixed $CMD
 
string $perms_clause
 
array $MOD_MENU
 
string $modMenu_type = ''
 
string $modMenu_dontValidateList = ''
 
string $modMenu_setDefaultList = ''
 
array $extClassConf
 
string $content = ''
 
object $extObj
 
array $pageinfo
 
ModuleTemplate $moduleTemplate
 
string $moduleName = 'user_task'
 

Private Attributes

array $deprecatedPublicProperties
 
array $deprecatedPublicMethods
 

Detailed Description

This class provides a task center for BE users

This is a specific Backend Controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 39 of file TaskModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ checkAccess()

bool TYPO3\CMS\Taskcenter\Controller\TaskModuleController::checkAccess (   $extKey,
  $taskClass 
)
protected

Check the access to a task. Considered are:

  • ‪Admins are always allowed
  • ‪Tasks can be restriced to admins only
  • ‪Tasks can be blinded for Users with TsConfig taskcenter.<extensionkey>.<taskName> = 0
Parameters
string$extKey‪Extension key
string$taskClass‪Name of the task
Returns
‪bool Access to the task allowed or not

Definition at line 590 of file TaskModuleController.php.

References $GLOBALS, and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getBackendUser().

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\indexAction(), and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\renderModuleContent().

◆ checkExtObj()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::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.

See also
handleExternalFunctionValue(), \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(), $extObj
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 731 of file TaskModuleController.php.

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

◆ checkSubExtObj()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::checkSubExtObj ( )
protected

Calls the checkExtObj function in sub module if present.

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 746 of file TaskModuleController.php.

◆ description()

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::description (   $title,
  $description = '' 
)

Render the headline of a task including a title and an optional description. Public since task objects use this.

Parameters
string$title‪Title
string$description‪Description
Returns
‪string formatted title and description

Definition at line 421 of file TaskModuleController.php.

◆ extObjContent()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::extObjContent ( )
protected

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

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 770 of file TaskModuleController.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getLanguageService().

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getExtObjContent().

◆ extObjHeader()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::extObjHeader ( )
protected

Calls the 'header' function inside the "Function menu module" if present. A header function might be needed to add JavaScript or other stuff in the head. This can't be done in the main function because the head is already written.

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 759 of file TaskModuleController.php.

◆ generateMenu()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::generateMenu ( )
protected

Generates the menu based on $this->MOD_MENU

Exceptions

Definition at line 252 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\main().

◆ getBackendUser()

◆ getButtons()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::getButtons ( )
protected

Create the panel of buttons for submitting the form or otherwise perform operations.

Definition at line 569 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\main().

◆ getExternalItemConfig()

mixed TYPO3\CMS\Taskcenter\Controller\TaskModuleController::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.
See also
handleExternalFunctionValue()

Definition at line 714 of file TaskModuleController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\handleExternalFunctionValue().

◆ getExtObjContent()

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::getExtObjContent ( )
protected

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

Returns
‪string
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 798 of file TaskModuleController.php.

References TYPO3\CMS\Taskcenter\Controller\TaskModuleController\$content, and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\extObjContent().

◆ getLanguageService()

◆ getModuleTemplate()

ModuleTemplate TYPO3\CMS\Taskcenter\Controller\TaskModuleController::getModuleTemplate ( )

Public since task objects use this.

Returns
‪ModuleTemplate

Definition at line 661 of file TaskModuleController.php.

References TYPO3\CMS\Taskcenter\Controller\TaskModuleController\$moduleTemplate.

◆ getPageRenderer()

PageRenderer TYPO3\CMS\Taskcenter\Controller\TaskModuleController::getPageRenderer ( )
protected
Returns
‪PageRenderer
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 812 of file TaskModuleController.php.

◆ getUniqueKey()

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::getUniqueKey (   $string)
protected

Create a unique key from a string which can be used in JS for sorting Therefore '_' are replaced

Parameters
string$string‪string which is used to generate the identifier
Returns
‪string Modified string

Definition at line 629 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\indexAction(), and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\renderListMenu().

◆ handleExternalFunctionValue()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::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)
See also
getExternalItemConfig(), init()

Definition at line 696 of file TaskModuleController.php.

References TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getExternalItemConfig().

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\__construct().

◆ indexAction()

◆ main()

◆ mainAction()

ResponseInterface TYPO3\CMS\Taskcenter\Controller\TaskModuleController::mainAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest Simply calls main() and writes the content to the response

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

Definition at line 288 of file TaskModuleController.php.

References $GLOBALS, and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\main().

◆ menuConfig()

◆ mergeExternalItems()

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::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.
See also
‪\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(), menuConfig()

Definition at line 676 of file TaskModuleController.php.

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

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\menuConfig().

◆ renderInformationContent()

TYPO3\CMS\Taskcenter\Controller\TaskModuleController::renderInformationContent ( )
protected

◆ renderListMenu()

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::renderListMenu (   $items,
  $mainMenu = false 
)

Render a list of items as a nicely formatted definition list including a link, icon, title and description. The keys of a single item are:

  • ‪title: Title of the item
  • ‪link: Link to the task
  • ‪icon: Path to the icon or Icon as HTML if it begins with <img
  • ‪description: Description of the task, using htmlspecialchars()
  • ‪descriptionHtml: Description allowing HTML tags which will override the description Public since task objects use this.
Parameters
array$items‪List of items to be displayed in the definition list.
bool$mainMenu‪Set it to TRUE to render the main menu
Returns
‪string Formatted definition list

Definition at line 446 of file TaskModuleController.php.

References TYPO3\CMS\Taskcenter\Controller\TaskModuleController\$id, TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath(), TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getBackendUser(), and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getUniqueKey().

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\indexAction().

◆ renderModuleContent()

◆ urlInIframe()

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::urlInIframe (   $url)
protected

Returns HTML code to dislay an url in an iframe at the right side of the taskcenter

Parameters
string$url‪Url to display
Returns
‪string Code that inserts the iframe (HTML)
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0. Remember to remove the fluid template, too.

Definition at line 612 of file TaskModuleController.php.

Member Data Documentation

◆ $CMD

mixed TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$CMD
protected

The value of GET/POST var, 'CMD'

See also
‪init()
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 94 of file TaskModuleController.php.

◆ $content

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$content = ''
protected

Generally used for accumulating the output content of backend modules

Definition at line 165 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getExtObjContent(), and TYPO3\CMS\Taskcenter\Controller\TaskModuleController\indexAction().

◆ $deprecatedPublicMethods

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$deprecatedPublicMethods
private
Initial value:
= array(
'menuConfig' => 'Using TaskModuleController::menuConfig() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'mergeExternalItems' => 'Using TaskModuleController::mergeExternalItems() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'handleExternalFunctionValue' => 'Using TaskModuleController::handleExternalFunctionValue() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'getExternalItemConfig' => 'Using TaskModuleController::getExternalItemConfig() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'main' => 'Using TaskModuleController::main() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'urlInIframe' => 'Using TaskModuleController::urlInIframe() is deprecated. The method will be removed in TYPO3 v10.0.',
'extObjHeader' => 'Using TaskModuleController::extObjHeader() is deprecated. The method will be removed in TYPO3 v10.0.',
'checkSubExtObj' => 'Using TaskModuleController::checkSubExtObj() is deprecated. The method will be removed in TYPO3 v10.0.',
'checkExtObj' => 'Using TaskModuleController::checkExtObj() is deprecated. The method will be removed in TYPO3 v10.0.',
'extObjContent' => 'Using TaskModuleController::extObjContent() is deprecated. The method will be removed in TYPO3 v10.0.',
'getExtObjContent' => 'Using TaskModuleController::getExtObjContent() is deprecated. The method will be removed in TYPO3 v10.0.',
)

Definition at line 60 of file TaskModuleController.php.

◆ $deprecatedPublicProperties

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$deprecatedPublicProperties
private
Initial value:
= array(
'MCONF' => 'Using TaskModuleController::$MCONF is deprecated and will not be possible anymore in TYPO3 v10.0.',
'id' => 'Using TaskModuleController::$id is deprecated and will not be possible anymore in TYPO3 v10.0.',
'MOD_MENU' => 'Using TaskModuleController::$MOD_MENU is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu_type' => 'Using TaskModuleController::$modMenu_type is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu_setDefaultList' => 'Using TaskModuleController::$$modMenu_setDefaultList is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu_dontValidateList' => 'Using TaskModuleController::$modMenu_dontValidateList is deprecated and will not be possible anymore in TYPO3 v10.0.',
'content' => 'Using TaskModuleController::$content is deprecated and will not be possible anymore in TYPO3 v10.0.',
'perms_clause' => 'Using TaskModuleController::$perms_clause is deprecated, the property will be removed in TYPO3 v10.0.',
'CMD' => 'Using TaskModuleController::$CMD is deprecated, the property will be removed in TYPO3 v10.0.',
'extClassConf' => 'Using TaskModuleController::$extClassConf is deprecated, the property will be removed in TYPO3 v10.0.',
'extObj' => 'Using TaskModuleController::$extObj is deprecated, the property will be removed in TYPO3 v10.0.',
)

Definition at line 44 of file TaskModuleController.php.

◆ $extClassConf

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$extClassConf
protected

Contains module configuration parts from TBE_MODULES_EXT if found

See also
handleExternalFunctionValue()
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 159 of file TaskModuleController.php.

◆ $extObj

object TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$extObj
protected

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

See also
checkExtObj()
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 173 of file TaskModuleController.php.

◆ $id

int TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$id
protected

The integer value of the GET/POST var, 'id'. Used for submodules to the 'Web' module (page id)

See also
‪init()

Definition at line 86 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\renderListMenu().

◆ $MCONF

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$MCONF = array( )
protected

Loaded with the global array $MCONF which holds some module configuration from the conf.php file of backend modules.

See also
‪init()

Definition at line 79 of file TaskModuleController.php.

◆ $MOD_MENU

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$MOD_MENU
protected
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.

See also
‪init()

Definition at line 109 of file TaskModuleController.php.

◆ $MOD_SETTINGS

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$MOD_SETTINGS = array( )

Current settings for the keys of the MOD_MENU array Public since task objects use this.

See also
$MOD_MENU

Definition at line 119 of file TaskModuleController.php.

◆ $modMenu_dontValidateList

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$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.

See also
menuConfig(), \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()

Definition at line 143 of file TaskModuleController.php.

◆ $modMenu_setDefaultList

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$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.

See also
menuConfig(), \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()

Definition at line 151 of file TaskModuleController.php.

◆ $modMenu_type

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$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.

See also
menuConfig(), \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()

Definition at line 135 of file TaskModuleController.php.

◆ $modTSconfig

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$modTSconfig

Module TSconfig based on PAGE TSconfig / USER TSconfig Public since task objects use this.

See also
menuConfig()

Definition at line 127 of file TaskModuleController.php.

◆ $moduleName

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$moduleName = 'user_task'
protected

The name of the module

Definition at line 189 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\__construct().

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$moduleTemplate
protected

ModuleTemplate Container

Definition at line 183 of file TaskModuleController.php.

Referenced by TYPO3\CMS\Taskcenter\Controller\TaskModuleController\getModuleTemplate().

◆ $pageinfo

array TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$pageinfo
protected

Definition at line 177 of file TaskModuleController.php.

◆ $perms_clause

string TYPO3\CMS\Taskcenter\Controller\TaskModuleController::$perms_clause
protected

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

See also
‪init()
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 102 of file TaskModuleController.php.