protected function buildPageIdRootline($pageId, $mountPoint = '')
    {
        $rootlinePageIds = [];

            /** @var $pageSelector PageRepository */
        $pageSelector = GeneralUtility::makeInstance(PageRepository::class);
        $rootline = $pageSelector->getRootLine($pageId, (string)$mountPoint);

        foreach ($rootline as $page) {
            if (Site::isRootPage($page)) {
                break;
            }

            array_unshift($rootlinePageIds, $page['pid']);
        }

        $rootlinePageIds[] = $pageId;

        return $rootlinePageIds;
    }
protected function buildPageIdRootline($pageId, $mountPoint = '')
    {
        $rootlinePageIds = [];

            /** @var $pageSelector PageRepository */
        $pageSelector = GeneralUtility::makeInstance(PageRepository::class);
        $rootline = $pageSelector->getRootLine($pageId, (string)$mountPoint);

        foreach ($rootline as $page) {
            if (Site::isRootPage($page)) {
                break;
            }

            array_unshift($rootlinePageIds, $page['pid']);
        }

        $rootlinePageIds[] = $pageId;

        return $rootlinePageIds;
    }
protected function buildPageIdRootline ( $ pageId , $ mountPoint = '' ) { $ rootlinePageIds = [ ] ; /** @var $pageSelector PageRepository */ $ pageSelector = GeneralUtility :: makeInstance ( PageRepository :: class ) ; $ rootline = $ pageSelector -> getRootLine ( $ pageId , ( string ) $ mountPoint ) ; foreach ( $ rootline as $ page ) { if ( Site :: isRootPage ( $ page ) ) { break ; } array_unshift ( $ rootlinePageIds , $ page [ 'pid' ] ) ; } $ rootlinePageIds [ ] = $ pageId ; return $ rootlinePageIds ; }
Builds a page's rootline of parent page Ids

@param int $pageId The page Id to build the rootline for
@param string $mountPoint The mount point parameter that will be passed to getRootline().
@return array Page Id rootline as array
Builds a page s rootline of parent page Ids