BackendLayoutView

Read onlyYes

Backend layout for CMS

Internal

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

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<string|int, mixed>
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<string|int, mixed>
Gets the selected backend layout structure as an array
isCTypeAllowedInColPosByPage()  : bool
parseStructure()  : array<string|int, mixed>
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<string|int, mixed> &$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<string|int, mixed>
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<string|int, mixed> &$parameters) : void
Parameters
$parameters : array<string|int, mixed>

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<string|int, mixed>

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
Internal

as the entire class. Note ManipulateBackendLayoutColPosConfigurationForPageEvent is declared internal as well. The event is needed for extensions like ext:container, but may still change when backend layout related code is consolidated.

Return values
array<string|int, mixed>

getSelectedBackendLayout()

Gets the selected backend layout structure as an array

public getSelectedBackendLayout(int $pageId) : array<string|int, mixed>
Parameters
$pageId : int
Return values
array<string|int, mixed>

isCTypeAllowedInColPosByPage()

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

parseStructure()

public parseStructure(BackendLayout $backendLayout) : array<string|int, mixed>
Parameters
$backendLayout : BackendLayout
Internal
Return values
array<string|int, mixed>

determinePageId()

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

protected determinePageId(string $tableName, array<string|int, mixed> $data) : int|false
Parameters
$tableName : string
$data : array<string|int, mixed>
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

Search results