‪TYPO3CMS  11.5
TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController Class Reference

Public Member Functions

 __construct (IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory)
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
string linkWrapTemplateTitle ($title, $onlyKey='')
 
string noTemplate ($newStandardTemplate=0)
 
string templateMenu (ServerRequestInterface $request)
 
string createTemplate ($id, $actTemplateId=0)
 

Public Attributes

string $modMenu_dontValidateList = ''
 
string $modMenu_setDefaultList = ''
 
array $MOD_MENU
 
array $MOD_SETTINGS = array( )
 

Protected Member Functions

 generateMenu ()
 
 getButtons ()
 
 setInPageArray (&$pArray, $rlArr, $row)
 
StandaloneView getFluidTemplateObject ($extensionName, $templateName='Main')
 
 applyWorkspaceConstraint (QueryBuilder $queryBuilder, string $tableName, int $workspaceId)
 
string getHookObjectForAction (string $action)
 
 menuConfig ($changedSettings)
 
array mergeExternalItems ($modName, $menuKey, $menuArr)
 
mixed getExternalItemConfig ($modName, $menuKey, $value='')
 
 checkExtObj ($changedSettings, ServerRequestInterface $request)
 
string null getExtObjContent ()
 
string getShortcutTitle ()
 
LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

string $perms_clause
 
array $pageinfo = array( )
 
bool $access = false
 
string $moduleName = 'web_ts'
 
ModuleTemplate $moduleTemplate
 
ExtendedTemplateService $templateService
 
 $id
 
array $modTSconfig
 
array $extClassConf
 
object $extObj
 
ServerRequestInterface $request
 
IconFactory $iconFactory
 
PageRenderer $pageRenderer
 
UriBuilder $uriBuilder
 
ModuleTemplateFactory $moduleTemplateFactory
 

Detailed Description

Module: TypoScript Tools

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

Definition at line 50 of file TypoScriptTemplateModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ applyWorkspaceConstraint()

TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::applyWorkspaceConstraint ( QueryBuilder  $queryBuilder,
string  $tableName,
int  $workspaceId 
)
protected

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

Parameters
QueryBuilder$queryBuilder
string$tableName
int$workspaceId

Definition at line 553 of file TypoScriptTemplateModuleController.php.

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ checkExtObj()

TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::checkExtObj (   $changedSettings,
ServerRequestInterface  $request 
)
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 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
‪\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction()
Parameters
array$changedSettings
ServerRequestInterface$request

Definition at line 655 of file TypoScriptTemplateModuleController.php.

References TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$request.

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ createTemplate()

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::createTemplate (   $id,
  $actTemplateId = 0 
)

◆ generateMenu()

TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::generateMenu ( )
protected

Generates the menu based on $this->MOD_MENU

Exceptions

Definition at line 153 of file TypoScriptTemplateModuleController.php.

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::getBackendUser ( )
protected

◆ getButtons()

◆ getExternalItemConfig()

mixed TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::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 635 of file TypoScriptTemplateModuleController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ getExtObjContent()

string null TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::getExtObjContent ( )
protected

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

Returns
‪string|null

Definition at line 670 of file TypoScriptTemplateModuleController.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getLanguageService().

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ getFluidTemplateObject()

StandaloneView TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::getFluidTemplateObject (   $extensionName,
  $templateName = 'Main' 
)
protected

Returns a new standalone view, shorthand function

Parameters
string$extensionName
string$templateName
Returns
‪StandaloneView

Definition at line 536 of file TypoScriptTemplateModuleController.php.

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction(), and TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\noTemplate().

◆ getHookObjectForAction()

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::getHookObjectForAction ( string  $action)
protected

◆ getLanguageService()

◆ getShortcutTitle()

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::getShortcutTitle ( )
protected

◆ linkWrapTemplateTitle()

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::linkWrapTemplateTitle (   $title,
  $onlyKey = '' 
)

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

Parameters
string$title
string$onlyKey
Returns
‪string

Definition at line 351 of file TypoScriptTemplateModuleController.php.

References TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$id.

◆ mainAction()

ResponseInterface TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::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 187 of file TypoScriptTemplateModuleController.php.

References TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$request, TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\applyWorkspaceConstraint(), TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\checkExtObj(), TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER, TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\generateMenu(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getBackendUser(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getButtons(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getExternalItemConfig(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getExtObjContent(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getFluidTemplateObject(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\getLanguageService(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getPagePermsClause(), TYPO3\CMS\Core\Localization\LanguageService\includeLLFile(), TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\menuConfig(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, and TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\setInPageArray().

◆ menuConfig()

TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::menuConfig (   $changedSettings)
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.

Parameters
array$changedSettings‪can be anything
See also
mainAction()
‪\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()
mergeExternalItems()

Definition at line 586 of file TypoScriptTemplateModuleController.php.

References TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mergeExternalItems().

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ mergeExternalItems()

array TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::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 611 of file TypoScriptTemplateModuleController.php.

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

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\menuConfig().

◆ noTemplate()

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::noTemplate (   $newStandardTemplate = 0)

◆ setInPageArray()

TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::setInPageArray ( $pArray,
  $rlArr,
  $row 
)
protected

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

Parameters
array$pArray‪Multidimensional array of page tree with template records
array$rlArr‪Rootline array
array$row‪Record of sys_template

Definition at line 504 of file TypoScriptTemplateModuleController.php.

Referenced by TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\mainAction().

◆ templateMenu()

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::templateMenu ( ServerRequestInterface  $request)

Render template menu, called from client classes.

Parameters
ServerRequestInterface$request
Returns
‪string

Definition at line 415 of file TypoScriptTemplateModuleController.php.

References TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController\$request.

Member Data Documentation

◆ $access

bool TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$access = false
protected

Definition at line 70 of file TypoScriptTemplateModuleController.php.

◆ $extClassConf

array TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$extClassConf
protected

Contains module configuration parts from TBE_MODULES_EXT if found

Definition at line 118 of file TypoScriptTemplateModuleController.php.

◆ $extObj

object TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$extObj
protected

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

See also
checkExtObj()

Definition at line 125 of file TypoScriptTemplateModuleController.php.

◆ $iconFactory

IconFactory TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$iconFactory
protected

◆ $id

◆ $MOD_MENU

array TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$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 98 of file TypoScriptTemplateModuleController.php.

◆ $MOD_SETTINGS

array TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$MOD_SETTINGS = array( )

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

Definition at line 106 of file TypoScriptTemplateModuleController.php.

◆ $modMenu_dontValidateList

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$modMenu_dontValidateList = ''

Definition at line 58 of file TypoScriptTemplateModuleController.php.

◆ $modMenu_setDefaultList

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$modMenu_setDefaultList = ''

Written by client classes

Definition at line 62 of file TypoScriptTemplateModuleController.php.

◆ $modTSconfig

array TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$modTSconfig
protected

Module TSconfig based on PAGE TSconfig / USER TSconfig

Definition at line 112 of file TypoScriptTemplateModuleController.php.

◆ $moduleName

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$moduleName = 'web_ts'
protected

The name of the module

Definition at line 76 of file TypoScriptTemplateModuleController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$moduleTemplate
protected

ModuleTemplate Container

Definition at line 82 of file TypoScriptTemplateModuleController.php.

◆ $moduleTemplateFactory

ModuleTemplateFactory TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$moduleTemplateFactory
protected

◆ $pageinfo

array TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$pageinfo = array( )
protected

Definition at line 66 of file TypoScriptTemplateModuleController.php.

◆ $pageRenderer

PageRenderer TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$pageRenderer
protected

◆ $perms_clause

string TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$perms_clause
protected

Definition at line 54 of file TypoScriptTemplateModuleController.php.

◆ $request

◆ $templateService

ExtendedTemplateService TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$templateService
protected

Definition at line 86 of file TypoScriptTemplateModuleController.php.

◆ $uriBuilder

UriBuilder TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::$uriBuilder
protected