RootlineUtility

A utility resolving and Caching the Rootline generation

Table of Contents

Constants

RUNTIME_CACHE_TAG  = 'rootline-utility'

Properties

$cache  : FrontendInterface
$cacheIdentifier  : string
$context  : Context
$languageUid  : int
$mountPointParameter  : string
$pageRepository  : PageRepository
$pageUid  : int
$parsedMountPointParameters  : array<string|int, int>
$runtimeCache  : FrontendInterface
$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
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, string|int|float|null>
Resolve relations as defined in TCA and add them to the provided $pageRecord array.
generateRootlineCache()  : void
Actual function to generate the rootline and cache it
getCacheIdentifier()  : string
getRecordArray()  : array<string, string|int|float|null>
Queries the database for the page record and returns it.
isMountedPage()  : bool
Checks whether the current Page is a Mounted Page (according to the MP-URL-Parameter)
parseMountPointParameter()  : void
Parse the MountPoint Parameters Splits the MP-Param via "," for several nested mountpoints and afterwords registers the mountpoint configurations
processMountedPage()  : array<string, string|int|float|null>
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.
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+

Constants

RUNTIME_CACHE_TAG

public mixed RUNTIME_CACHE_TAG = 'rootline-utility'
Internal

Properties

$cacheIdentifier

protected string $cacheIdentifier

$languageUid

protected int $languageUid = 0

$mountPointParameter

protected string $mountPointParameter

$parsedMountPointParameters

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

$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>

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, string|int|float|null> $pageRecord) : array<string, string|int|float|null>
Parameters
$uid : int

page ID

$pageRecord : array<string, string|int|float|null>

Page record (possibly overlaid) to be extended with relations

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

$pageRecord with additional relations

getCacheIdentifier()

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

getRecordArray()

Queries the database for the page record and returns it.

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

Page id

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

isMountedPage()

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

protected isMountedPage() : bool
Return values
bool

parseMountPointParameter()

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

protected parseMountPointParameter() : void

processMountedPage()

Enhances with mount point information or replaces the node if needed

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

page record array of mounted page

$mountPointPageData : array<string, string|int|float|null>

page record array of mount point page

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

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.

protected resolvePageId(int $pageId) : int

If the page was moved in a workspace, actually returns the UID of the moved version in the workspace.

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