‪TYPO3CMS  ‪main
TYPO3\CMS\Tstemplate\Controller\ConstantEditorController Class Reference
Inheritance diagram for TYPO3\CMS\Tstemplate\Controller\ConstantEditorController:
TYPO3\CMS\Tstemplate\Controller\AbstractTemplateModuleController

Public Member Functions

 __construct (protected readonly ModuleTemplateFactory $moduleTemplateFactory, private readonly SysTemplateRepository $sysTemplateRepository, private readonly SysTemplateTreeBuilder $treeBuilder, private readonly IncludeTreeTraverser $treeTraverser, private readonly AstTraverser $astTraverser, private readonly AstBuilderInterface $astBuilder, private readonly LosslessTokenizer $losslessTokenizer,)
 
 handleRequest (ServerRequestInterface $request)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Tstemplate\Controller\AbstractTemplateModuleController
 injectIconFactory (IconFactory $iconFactory)
 
 injectUriBuilder (UriBuilder $uriBuilder)
 
 injectConnectionPool (ConnectionPool $connectionPool)
 
 injectDataHandler (DataHandler $dataHandler)
 
 injectSiteFinder (SiteFinder $siteFinder)
 

Private Member Functions

 showAction (ServerRequestInterface $request)
 
 saveAction (ServerRequestInterface $request)
 
 noTemplateAction (ServerRequestInterface $request)
 
 updateTemplateConstants (ServerRequestInterface $request, array $constantDefinitions, string $rawTemplateConstants)
 
 calculateConstantPositions (array $rawTemplateConstantsArray, array &$constantPositions=[], string $prefix='', int $braceLevel=0, int &$lineCounter=0)
 
 addOrUpdateValueInConstantsArray (array $templateConstantsArray, array $constantPositions, string $constantKey, string $value)
 
 removeValueFromConstantsArray (array $templateConstantsArray, array $constantPositions, string $constantKey)
 
 addSaveButtonToDocHeader (ModuleTemplate $view)
 
 addShortcutButtonToDocHeader (ModuleTemplate $view, string $moduleIdentifier, array $pageInfo, int $pageUid)
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Tstemplate\Controller\AbstractTemplateModuleController
 createExtensionTemplateAction (ServerRequestInterface $request, string $redirectTarget)
 
 createNewWebsiteTemplateAction (ServerRequestInterface $request, string $redirectTarget)
 
 addPreviewButtonToDocHeader (ModuleTemplate $view, int $pageId, int $dokType)
 
 getClosestAncestorPageWithTemplateRecord (int $pageId)
 
 getScopedRootline (SiteInterface $site, array $fullRootLine)
 
 getAllTemplateRecordsOnPage (int $pageId)
 
array< string, mixed > false getFirstTemplateRecordOnPage (int $pageId, int $templateUid=0)
 
 getTemplateQueryBuilder (int $pid)
 
 getLanguageService ()
 
 getBackendUser ()
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Tstemplate\Controller\AbstractTemplateModuleController
IconFactory $iconFactory
 
UriBuilder $uriBuilder
 
ConnectionPool $connectionPool
 
SiteFinder $siteFinder
 

Detailed Description

TypoScript Constant editor

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

Definition at line 48 of file ConstantEditorController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Tstemplate\Controller\ConstantEditorController::__construct ( protected readonly ModuleTemplateFactory  $moduleTemplateFactory,
private readonly SysTemplateRepository  $sysTemplateRepository,
private readonly SysTemplateTreeBuilder  $treeBuilder,
private readonly IncludeTreeTraverser  $treeTraverser,
private readonly AstTraverser  $astTraverser,
private readonly AstBuilderInterface  $astBuilder,
private readonly LosslessTokenizer  $losslessTokenizer 
)

Definition at line 50 of file ConstantEditorController.php.

Member Function Documentation

◆ addOrUpdateValueInConstantsArray()

TYPO3\CMS\Tstemplate\Controller\ConstantEditorController::addOrUpdateValueInConstantsArray ( array  $templateConstantsArray,
array  $constantPositions,
string  $constantKey,
string  $value 
)
private

Update a constant value in current template constants if key exists already, or add key/value at the end if it does not exist yet.

Definition at line 433 of file ConstantEditorController.php.

Referenced by TYPO3\CMS\Tstemplate\Controller\ConstantEditorController\updateTemplateConstants().

◆ addSaveButtonToDocHeader()

◆ addShortcutButtonToDocHeader()

TYPO3\CMS\Tstemplate\Controller\ConstantEditorController::addShortcutButtonToDocHeader ( ModuleTemplate  $view,
string  $moduleIdentifier,
array  $pageInfo,
int  $pageUid 
)
private

◆ calculateConstantPositions()

TYPO3\CMS\Tstemplate\Controller\ConstantEditorController::calculateConstantPositions ( array  $rawTemplateConstantsArray,
array &  $constantPositions = [],
string  $prefix = '',
int  $braceLevel = 0,
int &  $lineCounter = 0 
)
private

◆ handleRequest()

◆ noTemplateAction()

◆ removeValueFromConstantsArray()

TYPO3\CMS\Tstemplate\Controller\ConstantEditorController::removeValueFromConstantsArray ( array  $templateConstantsArray,
array  $constantPositions,
string  $constantKey 
)
private

Remove a key from constant array.

Definition at line 452 of file ConstantEditorController.php.

Referenced by TYPO3\CMS\Tstemplate\Controller\ConstantEditorController\updateTemplateConstants().

◆ saveAction()

◆ showAction()

◆ updateTemplateConstants()