public static function getAccessRootlineByPageId(
        $pageId,
        $mountPointParameter = ''
    ) {
        $accessRootline = GeneralUtility::makeInstance(Rootline::class);

        $pageSelector = GeneralUtility::makeInstance(PageRepository::class);
        $pageSelector->init(false);
        $rootline = $pageSelector->getRootLine($pageId, $mountPointParameter);
        $rootline = array_reverse($rootline);
        // parent pages
        foreach ($rootline as $pageRecord) {
            if ($pageRecord['fe_group']
                && $pageRecord['extendToSubpages']
                && $pageRecord['uid'] != $pageId
            ) {
                $accessRootline->push(GeneralUtility::makeInstance(
                    RootlineElement::class,
                    /** @scrutinizer ignore-type */ $pageRecord['uid'] . RootlineElement::PAGE_ID_GROUP_DELIMITER . $pageRecord['fe_group']
                ));
            }
        }

        // current page
        $currentPageRecord = $pageSelector->getPage($pageId);
        if ($currentPageRecord['fe_group']) {
            $accessRootline->push(GeneralUtility::makeInstance(
                RootlineElement::class,
                /** @scrutinizer ignore-type */ $currentPageRecord['uid'] . RootlineElement::PAGE_ID_GROUP_DELIMITER . $currentPageRecord['fe_group']
            ));
        }

        return $accessRootline;
    }
public static function getAccessRootlineByPageId(
        $pageId,
        $mountPointParameter = ''
    ) {
        $accessRootline = GeneralUtility::makeInstance(Rootline::class);

        $pageSelector = GeneralUtility::makeInstance(PageRepository::class);
        $pageSelector->init(false);
        $rootline = $pageSelector->getRootLine($pageId, $mountPointParameter);
        $rootline = array_reverse($rootline);
        // parent pages
        foreach ($rootline as $pageRecord) {
            if ($pageRecord['fe_group']
                && $pageRecord['extendToSubpages']
                && $pageRecord['uid'] != $pageId
            ) {
                $accessRootline->push(GeneralUtility::makeInstance(
                    RootlineElement::class,
                    /** @scrutinizer ignore-type */ $pageRecord['uid'] . RootlineElement::PAGE_ID_GROUP_DELIMITER . $pageRecord['fe_group']
                ));
            }
        }

        // current page
        $currentPageRecord = $pageSelector->getPage($pageId);
        if ($currentPageRecord['fe_group']) {
            $accessRootline->push(GeneralUtility::makeInstance(
                RootlineElement::class,
                /** @scrutinizer ignore-type */ $currentPageRecord['uid'] . RootlineElement::PAGE_ID_GROUP_DELIMITER . $currentPageRecord['fe_group']
            ));
        }

        return $accessRootline;
    }
public static function getAccessRootlineByPageId ( $ pageId , $ mountPointParameter = '' ) { $ accessRootline = GeneralUtility :: makeInstance ( Rootline :: class ) ; $ pageSelector = GeneralUtility :: makeInstance ( PageRepository :: class ) ; $ pageSelector -> init ( false ) ; $ rootline = $ pageSelector -> getRootLine ( $ pageId , $ mountPointParameter ) ; $ rootline = array_reverse ( $ rootline ) ; // parent pages foreach ( $ rootline as $ pageRecord ) { if ( $ pageRecord [ 'fe_group' ] && $ pageRecord [ 'extendToSubpages' ] && $ pageRecord [ 'uid' ] != $ pageId ) { $ accessRootline -> push ( GeneralUtility :: makeInstance ( RootlineElement :: class , /** @scrutinizer ignore-type */ $ pageRecord [ 'uid' ] . RootlineElement :: PAGE_ID_GROUP_DELIMITER . $ pageRecord [ 'fe_group' ] ) ) ; } } // current page $ currentPageRecord = $ pageSelector -> getPage ( $ pageId ) ; if ( $ currentPageRecord [ 'fe_group' ] ) { $ accessRootline -> push ( GeneralUtility :: makeInstance ( RootlineElement :: class , /** @scrutinizer ignore-type */ $ currentPageRecord [ 'uid' ] . RootlineElement :: PAGE_ID_GROUP_DELIMITER . $ currentPageRecord [ 'fe_group' ] ) ) ; } return $ accessRootline ; }
Gets the Access Rootline for a specific page Id.

@param int $pageId The page Id to generate the Access Rootline for.
@param string $mountPointParameter The mount point parameter for generating the rootline.
@return \ApacheSolrForTypo3\Solr\Access\Rootline Access Rootline for the given page Id.
Gets the Access Rootline for a specific page Id .