public function getRootLine($pageUid = null, $reverse = false, $disableGroupAccessCheck = false)
{
if (null === $pageUid) {
$pageUid = $GLOBALS['TSFE']->id;
}
$cacheKey = md5($pageUid . (int) $reverse . (int) $disableGroupAccessCheck);
if (false === isset(static::$cachedRootlines[$cacheKey])) {
$pageRepository = $this->getPageRepository();
if (true === (bool) $disableGroupAccessCheck) {
$pageRepository->where_groupAccess = '';
}
$rootline = $pageRepository->getRootLine($pageUid);
if (true === $reverse) {
$rootline = array_reverse($rootline);
}
static::$cachedRootlines[$cacheKey] = $rootline;
}
return static::$cachedRootlines[$cacheKey];
}