Classes/Utility/GeneralUtility.php
protected static function filterRootlineBySiteroot(array $rootline)
    {
        $ret = array();

        // Make sure sorting is right (first root, last page)
        ksort($rootline, SORT_NUMERIC);

        //reverse rootline
        $rootline = array_reverse($rootline);

        foreach ($rootline as $page) {
            $ret[] = $page;
            if (!empty($page['is_siteroot'])) {
                break;
            }
        }
        $ret = array_reverse($ret);

        return $ret;
    }
protected static function filterRootlineBySiteroot(array $rootline)
    {
        $ret = array();

        // Make sure sorting is right (first root, last page)
        ksort($rootline, SORT_NUMERIC);

        //reverse rootline
        $rootline = array_reverse($rootline);

        foreach ($rootline as $page) {
            $ret[] = $page;
            if (!empty($page['is_siteroot'])) {
                break;
            }
        }
        $ret = array_reverse($ret);

        return $ret;
    }
protected static function filterRootlineBySiteroot ( array $ rootline ) { $ ret = array ( ) ; // Make sure sorting is right (first root, last page) ksort ( $ rootline , SORT_NUMERIC ) ; //reverse rootline $ rootline = array_reverse ( $ rootline ) ; foreach ( $ rootline as $ page ) { $ ret [ ] = $ page ; if ( ! empty ( $ page [ 'is_siteroot' ] ) ) { break ; } } $ ret = array_reverse ( $ ret ) ; return $ ret ; }
Filter rootline to get the real one up to siteroot page

@param $rootline

@return array
Filter rootline to get the real one up to siteroot page