TYPO3  7.6
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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 = array()
 
 $languageUid = 0
 
 $workspaceUid = 0
 
 $versionPreview = false
 
 $pageContext
 
 $cacheIdentifier
 
 $databaseConnection
 

Static Protected Attributes

static $cache = null
 
static $localCache = array()
 
static $rootlineFields
 
static $pageRecordCache = array()
 

Detailed Description

A utility resolving and Caching the Rootline generation

Definition at line 22 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 339 of file RootlineUtility.php.

get ( )

Returns the actual rootline

Returns
array

Definition at line 206 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 185 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 242 of file RootlineUtility.php.

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

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 399 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 441 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 412 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 173 of file RootlineUtility.php.

Member Data Documentation

$cache = null
staticprotected

Definition at line 57 of file RootlineUtility.php.

$cacheIdentifier
protected

Definition at line 104 of file RootlineUtility.php.

Referenced by RootlineUtility\get().

$databaseConnection
protected

Definition at line 114 of file RootlineUtility.php.

$languageUid = 0
protected

Definition at line 42 of file RootlineUtility.php.

$localCache = array()
staticprotected

Definition at line 62 of file RootlineUtility.php.

$mountPointParameter
protected
$pageContext
protected

Definition at line 99 of file RootlineUtility.php.

$pageRecordCache = array()
staticprotected

Definition at line 109 of file RootlineUtility.php.

$pageUid
protected

Definition at line 27 of file RootlineUtility.php.

Referenced by RootlineUtility\processMountedPage().

$parsedMountPointParameters = array()
protected

Definition at line 37 of file RootlineUtility.php.

$rootlineFields
staticprotected
Initial value:
= array(
'pid',
'uid',
't3ver_oid',
't3ver_wsid',
't3ver_state',
'title',
'alias',
'nav_title',
'media',
'layout',
'hidden',
'starttime',
'endtime',
'fe_group',
'extendToSubpages',
'doktype',
'TSconfig',
'is_siteroot',
'mount_pid',
'mount_pid_ol',
'fe_login_mode',
'backend_layout_next_level'
)

Definition at line 69 of file RootlineUtility.php.

$versionPreview = false
protected

Definition at line 52 of file RootlineUtility.php.

$workspaceUid = 0
protected

Definition at line 47 of file RootlineUtility.php.