Classes/Domain/Repository/SitemapRepository.php
private function getSubPagesRecursive($rootPageId)
    {
        $pages = $this->getSubPages($rootPageId);
        foreach ($pages as $page) {
            if (false === $this->isPageTreeLeaf($page)) {
                ArrayUtility::mergeRecursiveWithOverrule(
                    $pages,
                    $this->getSubPagesRecursive($page['uid'])
                );
            }
        }

        return $pages;
    }
private function getSubPagesRecursive($rootPageId)
    {
        $pages = $this->getSubPages($rootPageId);
        foreach ($pages as $page) {
            if (false === $this->isPageTreeLeaf($page)) {
                ArrayUtility::mergeRecursiveWithOverrule(
                    $pages,
                    $this->getSubPagesRecursive($page['uid'])
                );
            }
        }

        return $pages;
    }
private function getSubPagesRecursive ( $ rootPageId ) { $ pages = $ this -> getSubPages ( $ rootPageId ) ; foreach ( $ pages as $ page ) { if ( false === $ this -> isPageTreeLeaf ( $ page ) ) { ArrayUtility :: mergeRecursiveWithOverrule ( $ pages , $ this -> getSubPagesRecursive ( $ page [ 'uid' ] ) ) ; } } return $ pages ; }
Get sub pages recursive

@param $rootPageId

@return array
Get sub pages recursive