TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
RootlineUtility Class Reference

Public Member Functions

 __construct ($uid, $mountPointParameter= '', PageRepository $context=null)
 
 getCacheIdentifier ($otherUid=null)
 
 get ()
 
 isMountedPage ()
 

Static Public Member Functions

static purgeCaches ()
 

Protected Member Functions

 initializeObject ()
 
 getRecordArray ($uid)
 
 columnHasRelationToResolve (array $configuration)
 
 processMountedPage (array $mountedPageData, array $mountPointPageData)
 
 parseMountPointParameter ()
 

Protected Attributes

 $pageUid
 
 $mountPointParameter
 
 $parsedMountPointParameters = []
 
 $languageUid = 0
 
 $workspaceUid = 0
 
 $versionPreview = false
 
 $pageContext
 
 $cacheIdentifier
 

Static Protected Attributes

static $cache = null
 
static $localCache = []
 
static $rootlineFields
 
static $pageRecordCache = []
 

Detailed Description

A utility resolving and Caching the Rootline generation

Definition at line 26 of file RootlineUtility.php.

Constructor & Destructor Documentation

__construct (   $uid,
  $mountPointParameter = '',
PageRepository  $context = null 
)
Parameters
int$uid
string$mountPointParameter
\TYPO3\CMS\Frontend\Page\PageRepository$context
Exceptions
RuntimeException

Definition at line 122 of file RootlineUtility.php.

References $GLOBALS, RootlineUtility\$mountPointParameter, RootlineUtility\initializeObject(), and GeneralUtility\makeInstance().

Member Function Documentation

columnHasRelationToResolve ( array  $configuration)
protected

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

Parameters
array$configurationTCA configuration to check
Returns
bool TRUE, if it describes a non-CSV relation

Definition at line 374 of file RootlineUtility.php.

get ( )

Returns the actual rootline

Returns
array

Definition at line 205 of file RootlineUtility.php.

References RootlineUtility\$cacheIdentifier, and RootlineUtility\getCacheIdentifier().

getCacheIdentifier (   $otherUid = null)

Constructs the cache Identifier

Parameters
int$otherUid
Returns
string

Definition at line 184 of file RootlineUtility.php.

References RootlineUtility\$mountPointParameter.

Referenced by RootlineUtility\get(), RootlineUtility\getRecordArray(), and RootlineUtility\initializeObject().

getRecordArray (   $uid)
protected

Queries the database for the page record and returns it.

Parameters
int$uidPage id
Exceptions
RuntimeException
Returns
array

Definition at line 241 of file RootlineUtility.php.

References PageRepository\DOKTYPE_RECYCLER, RootlineUtility\getCacheIdentifier(), and GeneralUtility\makeInstance().

initializeObject ( )
protected

Initialize a state to work with

Exceptions
RuntimeException
Returns
void

Definition at line 144 of file RootlineUtility.php.

References $GLOBALS, RootlineUtility\getCacheIdentifier(), GeneralUtility\makeInstance(), RootlineUtility\parseMountPointParameter(), and GeneralUtility\trimExplode().

Referenced by RootlineUtility\__construct().

isMountedPage ( )

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

Returns
bool

Definition at line 434 of file RootlineUtility.php.

parseMountPointParameter ( )
protected

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

Returns
void

Definition at line 476 of file RootlineUtility.php.

References GeneralUtility\intExplode(), and GeneralUtility\trimExplode().

Referenced by RootlineUtility\initializeObject().

processMountedPage ( array  $mountedPageData,
array  $mountPointPageData 
)
protected

Enhances with mount point information or replaces the node if needed

Parameters
array$mountedPageDatapage record array of mounted page
array$mountPointPageDatapage record array of mount point page
Exceptions
RuntimeException
Returns
array

Definition at line 447 of file RootlineUtility.php.

References RootlineUtility\$pageUid.

static purgeCaches ( )
static

Purges all rootline caches.

Note: This function is intended to be used in unit tests only.

Returns
void

Definition at line 172 of file RootlineUtility.php.

Referenced by RootlineUtilityTest\tearDown().

Member Data Documentation

$cache = null
staticprotected

Definition at line 61 of file RootlineUtility.php.

$cacheIdentifier
protected

Definition at line 109 of file RootlineUtility.php.

Referenced by RootlineUtility\get().

$languageUid = 0
protected

Definition at line 46 of file RootlineUtility.php.

$localCache = []
staticprotected

Definition at line 66 of file RootlineUtility.php.

$mountPointParameter
protected
$pageContext
protected

Definition at line 104 of file RootlineUtility.php.

$pageRecordCache = []
staticprotected

Definition at line 114 of file RootlineUtility.php.

$pageUid
protected

Definition at line 31 of file RootlineUtility.php.

Referenced by RootlineUtility\processMountedPage().

$parsedMountPointParameters = []
protected

Definition at line 41 of file RootlineUtility.php.

$rootlineFields
staticprotected
Initial value:
= [
'pid',
'uid',
't3ver_oid',
't3ver_wsid',
't3ver_state',
'title',
'alias',
'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'
]

Definition at line 73 of file RootlineUtility.php.

$versionPreview = false
protected

Definition at line 56 of file RootlineUtility.php.

$workspaceUid = 0
protected

Definition at line 51 of file RootlineUtility.php.