PageLayoutResolver
Read onlyYes
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.
This is not part of TYPO3 Core API.
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
$dataProviderCollection
protected
DataProviderCollection
$dataProviderCollection
$pageTsConfigFactory
protected
PageTsConfigFactory
$pageTsConfigFactory
$siteFinder
protected
SiteFinder
$siteFinder
Methods
__construct()
public
__construct(DataProviderCollection $dataProviderCollection, SiteFinder $siteFinder, PageTsConfigFactory $pageTsConfigFactory) : mixed
Parameters
- $dataProviderCollection : DataProviderCollection
- $siteFinder : SiteFinder
- $pageTsConfigFactory : PageTsConfigFactory
getLayoutForPage()
public
getLayoutForPage(array<string|int, mixed> $pageRecord, array<string|int, mixed> $rootLine) : PageLayout|null
Parameters
- $pageRecord : array<string|int, mixed>
- $rootLine : array<string|int, mixed>
Return values
PageLayout|nullgetLayoutIdentifierForPage()
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<string|int, mixed> $page, array<string|int, mixed> $rootLine) : string
Parameters
- $page : array<string|int, mixed>
- $rootLine : array<string|int, mixed>
Return values
stringgetLayoutIdentifierForPageWithoutPrefix()
public
getLayoutIdentifierForPageWithoutPrefix(array<string|int, mixed> $page, array<string|int, mixed> $rootLine) : string
Parameters
- $page : array<string|int, mixed>
- $rootLine : array<string|int, mixed>