TypoScriptTemplateModuleController

Module: TypoScript Tools

Internal

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

Table of Contents

Properties

$MOD_MENU  : array<string|int, mixed>
The module menu items array. Each key represents a key for which values can range between the items in the array of that key.
$MOD_SETTINGS  : array<string|int, mixed>
Current settings for the keys of the MOD_MENU array, used in client classes
$modMenu_dontValidateList  : string
$modMenu_setDefaultList  : string
$access  : bool
$extClassConf  : array<string|int, mixed>
Contains module configuration parts from TBE_MODULES_EXT if found
$extObj  : object
May contain an instance of a 'Function menu module' which connects to this backend module.
$iconFactory  : IconFactory
$id  : int
$modTSconfig  : array<string|int, mixed>
Module TSconfig based on PAGE TSconfig / USER TSconfig
$moduleName  : string
The name of the module
$moduleTemplate  : ModuleTemplate
ModuleTemplate Container
$moduleTemplateFactory  : ModuleTemplateFactory
$pageinfo  : array<string|int, mixed>
$pageRenderer  : PageRenderer
$perms_clause  : string
$request  : ServerRequestInterface
$templateService  : ExtendedTemplateService
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
createTemplate()  : string
Create template, called from client classes.
linkWrapTemplateTitle()  : string
Wrap title for link in template, called from client classes.
mainAction()  : ResponseInterface
Injects the request object for the current request or subrequest Then checks for module functions that have hooked in, and renders menu etc.
noTemplate()  : string
No template, called from client classes.
templateMenu()  : string
Render template menu, called from client classes.
applyWorkspaceConstraint()  : mixed
Fetching all live records, and versioned records that do not have a "online ID" counterpart, as this is then handled via the BackendUtility::workspaceOL().
checkExtObj()  : mixed
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.
generateMenu()  : mixed
Generates the menu based on $this->MOD_MENU
getBackendUser()  : BackendUserAuthentication
Returns the Backend User
getButtons()  : mixed
Create the panel of buttons for submitting the form or otherwise perform operations.
getExternalItemConfig()  : mixed
Returns configuration values from the global variable $TBE_MODULES_EXT for the module given.
getExtObjContent()  : string|null
Return the content of the 'main' function inside the "Function menu module" if present
getFluidTemplateObject()  : StandaloneView
Returns a new standalone view, shorthand function
getHookObjectForAction()  : string
getLanguageService()  : LanguageService
Returns the Language Service
getShortcutTitle()  : string
Returns the shortcut title for the current page
menuConfig()  : mixed
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.
mergeExternalItems()  : array<string|int, mixed>
Merges menu items from global array $TBE_MODULES_EXT
setInPageArray()  : mixed
Set page in array To render list of page tree with templates

Properties

$MOD_MENU

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

public array<string|int, mixed> $MOD_MENU = ['function' => []]

Written by client classes.

$MOD_SETTINGS

Current settings for the keys of the MOD_MENU array, used in client classes

public array<string|int, mixed> $MOD_SETTINGS = []

$modMenu_dontValidateList

public string $modMenu_dontValidateList = ''

$modMenu_setDefaultList

public string $modMenu_setDefaultList = ''

Written by client classes

$extClassConf

Contains module configuration parts from TBE_MODULES_EXT if found

protected array<string|int, mixed> $extClassConf

$extObj

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

protected object $extObj
Tags
see
checkExtObj()

$modTSconfig

Module TSconfig based on PAGE TSconfig / USER TSconfig

protected array<string|int, mixed> $modTSconfig

$moduleName

The name of the module

protected string $moduleName = 'web_ts'

$pageinfo

protected array<string|int, mixed> $pageinfo = []

$perms_clause

protected string $perms_clause

$request

protected ServerRequestInterface $request

Methods

createTemplate()

Create template, called from client classes.

public createTemplate(int $id[, int $actTemplateId = 0 ]) : string
Parameters
$id : int
$actTemplateId : int = 0
Return values
string

linkWrapTemplateTitle()

Wrap title for link in template, called from client classes.

public linkWrapTemplateTitle(string $title[, string $onlyKey = '' ]) : string
Parameters
$title : string
$onlyKey : string = ''
Return values
string

mainAction()

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

public mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface

the current request

Return values
ResponseInterface

the response with the content

noTemplate()

No template, called from client classes.

public noTemplate([int $newStandardTemplate = 0 ]) : string
Parameters
$newStandardTemplate : int = 0
Return values
string

templateMenu()

Render template menu, called from client classes.

public templateMenu(ServerRequestInterface $request) : string
Parameters
$request : ServerRequestInterface
Return values
string

applyWorkspaceConstraint()

Fetching all live records, and versioned records that do not have a "online ID" counterpart, as this is then handled via the BackendUtility::workspaceOL().

protected applyWorkspaceConstraint(QueryBuilder $queryBuilder, string $tableName, int $workspaceId) : mixed
Parameters
$queryBuilder : QueryBuilder
$tableName : string
$workspaceId : int

checkExtObj()

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.

protected checkExtObj(array<string|int, mixed> $changedSettings, ServerRequestInterface $request) : mixed

The array $this->extClassConf is set 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.

Parameters
$changedSettings : array<string|int, mixed>
$request : ServerRequestInterface
Tags
see
ExtensionManagementUtility::insertModuleFunction()

generateMenu()

Generates the menu based on $this->MOD_MENU

protected generateMenu() : mixed
Tags
throws
InvalidArgumentException

getButtons()

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

protected getButtons() : mixed

getExternalItemConfig()

Returns configuration values from the global variable $TBE_MODULES_EXT for the module given.

protected getExternalItemConfig(string $modName, string $menuKey[, string $value = '' ]) : mixed

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
$modName : string

Module name

$menuKey : string

Menu key, eg. "function" for the function menu. See $this->MOD_MENU

$value : string = ''

Optionally the value-key to fetch from the array that would otherwise have been returned if this value was not set. Look source...

Return values
mixed

The value from the TBE_MODULES_EXT array.

getExtObjContent()

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

protected getExtObjContent() : string|null
Return values
string|null

getFluidTemplateObject()

Returns a new standalone view, shorthand function

protected getFluidTemplateObject(string $extensionName[, string $templateName = 'Main' ]) : StandaloneView
Parameters
$extensionName : string
$templateName : string = 'Main'
Return values
StandaloneView

getHookObjectForAction()

protected getHookObjectForAction(string $action) : string
Parameters
$action : string
Return values
string

getShortcutTitle()

Returns the shortcut title for the current page

protected getShortcutTitle() : string
Return values
string

menuConfig()

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.

protected menuConfig(array<string|int, mixed> $changedSettings) : mixed

Also loads the modTSconfig internal variable.

Parameters
$changedSettings : array<string|int, mixed>

can be anything

Tags
see
mainAction()
see
BackendUtility::getModuleData()
see
mergeExternalItems()

mergeExternalItems()

Merges menu items from global array $TBE_MODULES_EXT

protected mergeExternalItems(string $modName, string $menuKey, array<string|int, mixed> $menuArr) : array<string|int, mixed>
Parameters
$modName : string

Module name for which to find value

$menuKey : string

Menu key, eg. 'function' for the function menu.

$menuArr : array<string|int, mixed>

The part of a MOD_MENU array to work on.

Internal
Tags
see
ExtensionManagementUtility::insertModuleFunction()
see
menuConfig()
Return values
array<string|int, mixed>

Modified array part.

setInPageArray()

Set page in array To render list of page tree with templates

protected setInPageArray(array<string|int, mixed> &$pArray, array<string|int, mixed> $rlArr, array<string|int, mixed> $row) : mixed
Parameters
$pArray : array<string|int, mixed>

Multidimensional array of page tree with template records

$rlArr : array<string|int, mixed>

Rootline array

$row : array<string|int, mixed>

Record of sys_template


        
On this page

Search results