RootlineUtility

A utility resolving and Caching the Rootline generation

Table of Contents

Properties

$cache  : FrontendInterface
$cacheIdentifier  : string
$context  : Context
Query context
$languageUid  : int
$localCache  : array<string|int, mixed>
$mountPointParameter  : string
$pageRecordCache  : array<string|int, mixed>
$pageRepository  : PageRepository
Database Query Object
$pageUid  : int
$parsedMountPointParameters  : array<string|int, mixed>
$rootlineFields  : array<string|int, mixed>
Fields to fetch when populating rootline data
$workspaceUid  : int

Methods

__construct()  : mixed
get()  : array<string|int, mixed>
Returns the actual rootline without the tree root (uid=0), including the page with $this->pageUid
getCacheIdentifier()  : string
Constructs the cache Identifier
isMountedPage()  : bool
Checks whether the current Page is a Mounted Page (according to the MP-URL-Parameter)
purgeCaches()  : mixed
Purges all rootline caches.
columnHasRelationToResolve()  : bool
Checks whether the TCA Configuration array of a column describes a relation which is not stored as CSV in the record
createQueryBuilder()  : QueryBuilder
enrichWithRelationFields()  : array<string|int, mixed>
Resolve relations as defined in TCA and add them to the provided $pageRecord array.
generateRootlineCache()  : mixed
Actual function to generate the rootline and cache it
getRecordArray()  : array<string|int, mixed>
Queries the database for the page record and returns it.
parseMountPointParameter()  : mixed
Parse the MountPoint Parameters Splits the MP-Param via "," for several nested mountpoints and afterwords registers the mountpoint configurations
processMountedPage()  : array<string|int, mixed>
Enhances with mount point information or replaces the node if needed
resolveMovePointerId()  : int|null
Fetched the UID of the versioned record if the live record has been moved in a workspace.
resolvePageId()  : int
Fetches the UID of the page, but if the page was moved in a workspace, actually returns the UID of the moved version in the workspace.
resolvePageRecord()  : array<string|int, mixed>|null
sanitizeMountPointParameter()  : string
Sanitize the MountPoint Parameter Splits the MP-Param via "," and removes mountpoints that don't have the format \d+-\d+

Properties

$cacheIdentifier

protected string $cacheIdentifier

$languageUid

protected int $languageUid = 0

$localCache

protected static array<string|int, mixed> $localCache = []

$mountPointParameter

protected string $mountPointParameter

$pageRecordCache

protected static array<string|int, mixed> $pageRecordCache = []

$parsedMountPointParameters

protected array<string|int, mixed> $parsedMountPointParameters = []

$rootlineFields

Fields to fetch when populating rootline data

protected static array<string|int, mixed> $rootlineFields = ['pid', 'uid', 't3ver_oid', 't3ver_wsid', 't3ver_state', 'title', 'nav_title', 'media', 'layout', 'hidden', 'starttime', 'endtime', 'fe_group', 'extendToSubpages', 'doktype', 'TSconfig', 'tsconfig_includes', 'is_siteroot', 'mount_pid', 'mount_pid_ol', 'fe_login_mode', 'backend_layout_next_level']

$workspaceUid

protected int $workspaceUid = 0

Methods

get()

Returns the actual rootline without the tree root (uid=0), including the page with $this->pageUid

public get() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCacheIdentifier()

Constructs the cache Identifier

public getCacheIdentifier([int $otherUid = null ]) : string
Parameters
$otherUid : int = null
Return values
string

isMountedPage()

Checks whether the current Page is a Mounted Page (according to the MP-URL-Parameter)

public isMountedPage() : bool
Return values
bool

purgeCaches()

Purges all rootline caches.

public static purgeCaches() : mixed
Internal

only used in EXT:core, no public API

columnHasRelationToResolve()

Checks whether the TCA Configuration array of a column describes a relation which is not stored as CSV in the record

protected columnHasRelationToResolve(array<string|int, mixed> $configuration) : bool
Parameters
$configuration : array<string|int, mixed>

TCA configuration to check

Return values
bool

TRUE, if it describes a non-CSV relation

enrichWithRelationFields()

Resolve relations as defined in TCA and add them to the provided $pageRecord array.

protected enrichWithRelationFields(int $uid, array<string|int, mixed> $pageRecord) : array<string|int, mixed>
Parameters
$uid : int

page ID

$pageRecord : array<string|int, mixed>

Page record (possibly overlaid) to be extended with relations

Tags
throws
PagePropertyRelationNotFoundException
Return values
array<string|int, mixed>

$pageRecord with additional relations

getRecordArray()

Queries the database for the page record and returns it.

protected getRecordArray(int $uid) : array<string|int, mixed>
Parameters
$uid : int

Page id

Tags
throws
PageNotFoundException
Return values
array<string|int, mixed>

parseMountPointParameter()

Parse the MountPoint Parameters Splits the MP-Param via "," for several nested mountpoints and afterwords registers the mountpoint configurations

protected parseMountPointParameter() : mixed

processMountedPage()

Enhances with mount point information or replaces the node if needed

protected processMountedPage(array<string|int, mixed> $mountedPageData, array<string|int, mixed> $mountPointPageData) : array<string|int, mixed>
Parameters
$mountedPageData : array<string|int, mixed>

page record array of mounted page

$mountPointPageData : array<string|int, mixed>

page record array of mount point page

Tags
throws
BrokenRootLineException
Return values
array<string|int, mixed>

resolveMovePointerId()

Fetched the UID of the versioned record if the live record has been moved in a workspace.

protected resolveMovePointerId(int $liveId) : int|null
Parameters
$liveId : int
Return values
int|null

resolvePageId()

Fetches the UID of the page, but if the page was moved in a workspace, actually returns the UID of the moved version in the workspace.

protected resolvePageId(int $pageId) : int
Parameters
$pageId : int
Return values
int

resolvePageRecord()

protected resolvePageRecord(int $pageId) : array<string|int, mixed>|null
Parameters
$pageId : int
Return values
array<string|int, mixed>|null

sanitizeMountPointParameter()

Sanitize the MountPoint Parameter Splits the MP-Param via "," and removes mountpoints that don't have the format \d+-\d+

protected sanitizeMountPointParameter(string $mountPointParameter) : string
Parameters
$mountPointParameter : string
Return values
string

        
On this page

Search results