BackendLayoutView

readonly class \TYPO3\CMS\Backend\View\BackendLayoutView

Backend layout for CMS

Tags

todo:

This class name is unfortunate and the scope of this class in general convoluted and unclear.

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Methods

__construct()  : mixed
addBackendLayoutItems()  : void
This method is called as "itemsProcFunc" with the accordant context for pages.backend_layout and pages.backend_layout_next_level.
colPosListItemProcFunc()  : void
Gets colPos items to be shown in form engine. This method is called as "itemsProcFunc" with the accordant context for tt_content.colPos.
getBackendLayoutForPage()  : BackendLayout
Get the BackendLayout object and parse the structure based on the UserTSconfig
getColPosConfigurationForPage()  : array
This method is mainly used to retrieve the final allowed/disallowed content element configuration per colPos. It is an implementation of what ext:content_defender provided as extension for a long time already. This method is embedded in the overall rather convoluted handling around backend layouts. It is - at least for now - subject to change.
getSelectedBackendLayout()  : array
Gets the selected backend layout structure as an array
isCTypeAllowedInColPosByPage()  : bool
parseStructure()  : array
determinePageId()  : int|false
Determines the page id for a given record of a database table.
getSelectedCombinedIdentifier()  : false|string
Returns the backend layout which should be used for this page.

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, FrontendInterface $runtimeCache, DataProviderCollection $dataProviderCollection, TypoScriptStringFactory $typoScriptStringFactory, PageLayoutResolver $pageLayoutResolver) : mixed

Parameters

$eventDispatcher : EventDispatcherInterface
$runtimeCache : FrontendInterface
$dataProviderCollection : DataProviderCollection
$typoScriptStringFactory : TypoScriptStringFactory
$pageLayoutResolver : PageLayoutResolver

addBackendLayoutItems()

This method is called as "itemsProcFunc" with the accordant context for pages.backend_layout and pages.backend_layout_next_level.

public addBackendLayoutItems(array &$parameters) : void

Also used in the info module, since we need those items with the appropriate labels and backend layout identifiers there, too.

Parameters

$parameters : array

Tags

todo

This method should return the items array instead of using the whole parameters array as reference. This has to be adjusted, as soon as the itemsProcFunc functionality is changed in this regard.

colPosListItemProcFunc()

Gets colPos items to be shown in form engine. This method is called as "itemsProcFunc" with the accordant context for tt_content.colPos.

public colPosListItemProcFunc(array &$parameters) : void

Parameters

$parameters : array

getBackendLayoutForPage()

Get the BackendLayout object and parse the structure based on the UserTSconfig

public getBackendLayoutForPage(int $pageId) : BackendLayout

Parameters

$pageId : int

Return values

BackendLayout

getColPosConfigurationForPage()

This method is mainly used to retrieve the final allowed/disallowed content element configuration per colPos. It is an implementation of what ext:content_defender provided as extension for a long time already. This method is embedded in the overall rather convoluted handling around backend layouts. It is - at least for now - subject to change.

public getColPosConfigurationForPage(BackendLayout $backendLayout, int $colPos, int $pageUid[, ServerRequestInterface|null $request = null ]) : array

The method emits an event that is declared internal as well.

When calling the method, the optional request argument should be hand whenever available to give event listeners as much context as possible.

Parameters

$backendLayout : BackendLayout
$colPos : int
$pageUid : int
$request : ServerRequestInterface|null = null

Return values

array

getSelectedBackendLayout()

Gets the selected backend layout structure as an array

public getSelectedBackendLayout(int $pageId) : array

Parameters

$pageId : int

Return values

array

isCTypeAllowedInColPosByPage()

public isCTypeAllowedInColPosByPage(string $cType, int $colPos, int $pageUid) : bool

Parameters

$cType : string
$colPos : int
$pageUid : int

Return values

bool

determinePageId()

Determines the page id for a given record of a database table.

protected determinePageId(string $tableName, array $data) : int|false

Parameters

$tableName : string
$data : array

Return values

int|false —

Returns page id or false on error

getSelectedCombinedIdentifier()

Returns the backend layout which should be used for this page.

protected getSelectedCombinedIdentifier(int $pageId) : false|string

Parameters

$pageId : int

Return values

false|string —

Identifier of the backend layout to be used, or FALSE if none

On this page