‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController Class Reference

Public Member Functions

 __construct ()
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
ResponseInterface wizardAction (ServerRequestInterface $request)
 
array getPageInfo ()
 
int null getColPos ()
 
int getSysLanguage ()
 
int getUidPid ()
 

Protected Member Functions

 init (ServerRequestInterface $request)
 
string onClickInsertRecord (string $clientContext)
 
 prepareContent (string $clientContext)
 
 definePositionMapEntries (string $clientContext)
 
 getButtons ()
 
array getWizards ()
 
array getAppendWizards (array $wizardElements)
 
array getWizardItem (array $itemConf)
 
array getWizardGroupHeader (array $wizardGroup)
 
 removeInvalidWizardItems (array &$wizardItems)
 
 prepareDependencyOrdering (&$wizardGroup, $key)
 
LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUser ()
 
StandaloneView getFluidTemplateObject (string $filename='Main.html')
 

Protected Attributes

int $id
 
int $sys_language = 0
 
string $R_URI = ''
 
int null $colPos
 
int $uid_pid
 
array $config
 
array $pageInfo
 
StandaloneView $view
 
StandaloneView $menuItemView
 
ModuleTemplate $moduleTemplate
 
UriBuilder $uriBuilder
 

Detailed Description

Script Class for the New Content element wizard

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

Definition at line 43 of file NewContentElementController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::__construct ( )

Member Function Documentation

◆ definePositionMapEntries()

TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::definePositionMapEntries ( string  $clientContext)
protected

User must select a column as well (when in "main mode"), so the position map is initialized and assigned to the view.

Parameters
string$clientContext

Definition at line 302 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\$sys_language.

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\prepareContent().

◆ getAppendWizards()

array TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getAppendWizards ( array  $wizardElements)
protected
Parameters
array$wizardElements
Returns
‪array

Definition at line 394 of file NewContentElementController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\getWizards().

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getBackendUser ( )
protected

◆ getButtons()

TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getButtons ( )
protected

◆ getColPos()

int null TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getColPos ( )

Provide information about the column position of the button that triggered the wizard

Returns
‪int|null

Definition at line 583 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\$colPos.

◆ getFluidTemplateObject()

StandaloneView TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getFluidTemplateObject ( string  $filename = 'Main.html')
protected

◆ getLanguageService()

◆ getPageInfo()

array TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getPageInfo ( )

Provide information about the current page making use of the wizard

Returns
‪array

Definition at line 573 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\$pageInfo.

◆ getSysLanguage()

int TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getSysLanguage ( )

Provide information about the language used while triggering the wizard

Returns
‪int

Definition at line 593 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\$sys_language.

◆ getUidPid()

int TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getUidPid ( )

Provide information about the element to position the new element after (uid) or into (pid)

Returns
‪int

Definition at line 603 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\$uid_pid.

◆ getWizardGroupHeader()

array TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getWizardGroupHeader ( array  $wizardGroup)
protected

◆ getWizardItem()

array TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::getWizardItem ( array  $itemConf)
protected

◆ getWizards()

◆ init()

◆ mainAction()

ResponseInterface TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::mainAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now

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

Definition at line 148 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\init(), and TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\prepareContent().

◆ onClickInsertRecord()

string TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::onClickInsertRecord ( string  $clientContext)
protected

Create on-click event value.

Parameters
string$clientContext
Returns
‪string

Definition at line 176 of file NewContentElementController.php.

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\prepareContent().

◆ prepareContent()

◆ prepareDependencyOrdering()

TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::prepareDependencyOrdering ( $wizardGroup,
  $key 
)
protected

Prepare a wizard tab configuration for sorting.

Parameters
array$wizardGroup‪TypoScript wizard tab configuration
string$key‪Which array key should be prepared

Definition at line 529 of file NewContentElementController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\getWizards().

◆ removeInvalidWizardItems()

TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::removeInvalidWizardItems ( array &  $wizardItems)
protected

Checks the array for elements which might contain unallowed default values and will unset them! Looks for the "tt_content_defValues" key in each element and if found it will traverse that array as fieldname / value pairs and check. The values will be added to the "params" key of the array (which should probably be unset or empty by default).

Parameters
array$wizardItemsWizard items, passed by reference

Definition at line 449 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\$config, $GLOBALS, TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString(), TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\getBackendUser(), TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\getLanguageService(), TYPO3\CMS\Backend\Utility\BackendUtility\getTCEFORM_TSconfig(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\getWizards().

◆ wizardAction()

ResponseInterface TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::wizardAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now

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

Definition at line 163 of file NewContentElementController.php.

References TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\init(), and TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController\prepareContent().

Member Data Documentation

◆ $colPos

int null TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$colPos
protected

◆ $config

array TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$config
protected

◆ $id

int TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$id
protected

◆ $menuItemView

StandaloneView TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$menuItemView
protected

Definition at line 89 of file NewContentElementController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$moduleTemplate
protected

ModuleTemplate object

Definition at line 95 of file NewContentElementController.php.

◆ $pageInfo

array TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$pageInfo
protected

◆ $R_URI

string TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$R_URI = ''
protected

Return URL.

Definition at line 61 of file NewContentElementController.php.

◆ $sys_language

◆ $uid_pid

int TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$uid_pid
protected

◆ $uriBuilder

UriBuilder TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$uriBuilder
protected

Definition at line 99 of file NewContentElementController.php.

◆ $view

StandaloneView TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::$view
protected