NewContentElementController

class \TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController

New Content element wizard. This is the modal that pops up when clicking "+content" in page module, which will trigger wizardAction() since there is a colPos given. Method positionMapAction() is triggered for instance from the list module "+content" on tt_content table header, and from list module doc-header "+" and then "Click here for wizard".

Attributes

#[AsController]

Table of Contents

Properties

$backendViewFactory  : BackendViewFactory
$colPos  : int|null
If set, the content is destined for a specific column.
$dependencyOrderingService  : DependencyOrderingService
$eventDispatcher  : EventDispatcherInterface
$id  : int
$pageInfo  : array
$returnUrl  : string
$sys_language  : int
$uid_pid  : int
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
handleRequest()  : ResponseInterface
Process incoming request and dispatch to the requested action
getAppendWizards()  : array
getBackendUser()  : BackendUserAuthentication
getLanguageService()  : LanguageService
getWizards()  : array
Returns the array of elements in the wizard display.
loadAvailableWizards()  : array
loadAvailableWizardsFromContentElements()  : array
loadAvailableWizardsFromPluginSubTypes()  : array
mergeContentElementAndPluginSubTypeWizards()  : array
This method merges wizards defined from CType itemGroups (Content Elements) and list_type itemGroups (Plugin subtypes). It is important that labels from list_type do not override labels from CType. The "default" group is a prominent example. This is why we do not do a simple array_replace_recursive.
mergeContentElementWizardsWithPageTSConfigWizards()  : array
This method merges Content Element wizards defined by TCA with wizards defined in PageTSConfig.
migrateCommonGroupToDefault()  : array<string, array>
This method returns the wizard items, defined in Page TSconfig for b/w compatibility.
migratePositionalCommonGroupToDefault()  : array
orderWizards()  : array
positionMapAction()  : ResponseInterface
Renders the position map
prepareDependencyOrdering()  : array
Prepare a wizard tab configuration for sorting.
prepareWizardItem()  : array
removeInvalidWizardItems()  : array
Checks the array for elements which might contain invalid default values and will unset them! Looks for the "defaultValues" key in each element and if found it will traverse that array as fieldname / value pairs and check.
removeWizardsByPageTs()  : array
wizardAction()  : ResponseInterface
Renders the wizard

Properties

$colPos

If set, the content is destined for a specific column.

protected int|null $colPos = null

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

$returnUrl

protected string $returnUrl = ''

$sys_language

protected int $sys_language = 0

Methods

handleRequest()

Process incoming request and dispatch to the requested action

public handleRequest(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

getAppendWizards()

protected getAppendWizards(array $wizardElements) : array

Parameters

$wizardElements : array

Return values

array

getWizards()

Returns the array of elements in the wizard display.

protected getWizards() : array

For the plugin section there is support for adding elements there from a global variable.

Return values

array

loadAvailableWizards()

protected loadAvailableWizards(string $typeField[, bool $isPluginSubType = false ]) : array

Parameters

$typeField : string
$isPluginSubType : bool = false

Return values

array

loadAvailableWizardsFromContentElements()

protected loadAvailableWizardsFromContentElements() : array

Return values

array

loadAvailableWizardsFromPluginSubTypes()

protected loadAvailableWizardsFromPluginSubTypes() : array

Deprecated

Remove in v14, when "sub types" are removed altogether

Return values

array

mergeContentElementAndPluginSubTypeWizards()

This method merges wizards defined from CType itemGroups (Content Elements) and list_type itemGroups (Plugin subtypes). It is important that labels from list_type do not override labels from CType. The "default" group is a prominent example. This is why we do not do a simple array_replace_recursive.

protected mergeContentElementAndPluginSubTypeWizards(array $contentElementWizards, array $pluginSubTypeWizards) : array

Parameters

$contentElementWizards : array
$pluginSubTypeWizards : array

Return values

array

mergeContentElementWizardsWithPageTSConfigWizards()

This method merges Content Element wizards defined by TCA with wizards defined in PageTSConfig.

protected mergeContentElementWizardsWithPageTSConfigWizards(array $contentElementWizards, array $pageTsConfigWizards) : array

PageTS has precedence. It might happen that both TCA and PageTS define an entry with exactly the same default values. In such a case, the automatically added TCA entry is dropped.

Parameters

$contentElementWizards : array
$pageTsConfigWizards : array

Return values

array

migrateCommonGroupToDefault()

This method returns the wizard items, defined in Page TSconfig for b/w compatibility.

protected migrateCommonGroupToDefault(array<string, array> $wizardsFromPageTs) : array<string, array>

Additionally, it migrates previously defined wizard items in the common group to the new default group, which is defined in TCA.

Parameters

$wizardsFromPageTs : array<string, array>

Return values

array<string, array>

migratePositionalCommonGroupToDefault()

protected migratePositionalCommonGroupToDefault(array $wizards) : array

Parameters

$wizards : array

Return values

array

positionMapAction()

Renders the position map

protected positionMapAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

prepareDependencyOrdering()

Prepare a wizard tab configuration for sorting.

protected prepareDependencyOrdering(array $wizardGroup, string $key) : array

Parameters

$wizardGroup : array
$key : string

Return values

array

prepareWizardItem()

protected prepareWizardItem(array $itemConf) : array

Parameters

$itemConf : array

Return values

array

removeInvalidWizardItems()

Checks the array for elements which might contain invalid default values and will unset them! Looks for the "defaultValues" key in each element and if found it will traverse that array as fieldname / value pairs and check.

protected removeInvalidWizardItems(array $wizardItems) : array

Parameters

$wizardItems : array

Return values

array

removeWizardsByPageTs()

protected removeWizardsByPageTs(array $wizards, mixed $wizardsItemsPageTs) : array

Parameters

$wizards : array
$wizardsItemsPageTs : mixed

Return values

array

wizardAction()

Renders the wizard

protected wizardAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface
On this page