PageLayoutResolver

readonly class \TYPO3\CMS\Core\Page\PageLayoutResolver

Finds the proper layout for a page, using the database fields "backend_layout" and "backend_layout_next_level".

The most crucial part is that "backend_layout" is only applied for the CURRENT level, whereas backend_layout_next_level.

Used in TypoScript as "getData:pagelayout".

Currently, there is a hard dependency on EXT:backend however, all DataProvider logic should be migrated towards EXT:core.

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Properties

$dataProviderCollection  : DataProviderCollection
$pageTsConfigFactory  : PageTsConfigFactory
$siteFinder  : SiteFinder

Methods

__construct()  : mixed
getLayoutForPage()  : PageLayout|null
getLayoutIdentifierForPage()  : string
Check if the current page has a value in the DB field "backend_layout" if empty, check the root line for "backend_layout_next_level" Same as TypoScript: field = backend_layout ifEmpty.data = levelfield:-2, backend_layout_next_level, slide ifEmpty.ifEmpty = default
getLayoutIdentifierForPageWithoutPrefix()  : string

Properties

Methods

getLayoutForPage()

public getLayoutForPage(array $pageRecord, array $rootLine) : PageLayout|null

Parameters

$pageRecord : array
$rootLine : array

Return values

PageLayout|null

getLayoutIdentifierForPage()

Check if the current page has a value in the DB field "backend_layout" if empty, check the root line for "backend_layout_next_level" Same as TypoScript: field = backend_layout ifEmpty.data = levelfield:-2, backend_layout_next_level, slide ifEmpty.ifEmpty = default

public getLayoutIdentifierForPage(array $page, array $rootLine) : string

Parameters

$page : array
$rootLine : array

Return values

string

getLayoutIdentifierForPageWithoutPrefix()

public getLayoutIdentifierForPageWithoutPrefix(array $page, array $rootLine) : string

Parameters

$page : array
$rootLine : array

Return values

string
On this page