private static function getParents($rawRoutes)
    {
        $grav = Grav::instance();

        /** @var Pages $pages */
        $pages = $grav['pages'];

        $parents = $pages->getList(null, 0, $rawRoutes);

        if (isset($grav['admin'])) {
            // Remove current route from parents

            /** @var Admin $admin */
            $admin = $grav['admin'];

            $page = $admin->getPage($admin->route);
            $page_route = $page->route();
            if (isset($parents[$page_route])) {
                unset($parents[$page_route]);
            }

        }

        return $parents;
    }
private static function getParents($rawRoutes)
    {
        $grav = Grav::instance();

        /** @var Pages $pages */
        $pages = $grav['pages'];

        $parents = $pages->getList(null, 0, $rawRoutes);

        if (isset($grav['admin'])) {
            // Remove current route from parents

            /** @var Admin $admin */
            $admin = $grav['admin'];

            $page = $admin->getPage($admin->route);
            $page_route = $page->route();
            if (isset($parents[$page_route])) {
                unset($parents[$page_route]);
            }

        }

        return $parents;
    }
private static function getParents ( $ rawRoutes ) { $ grav = Grav :: instance ( ) ; /** @var Pages $pages */ $ pages = $ grav [ 'pages' ] ; $ parents = $ pages -> getList ( null , 0 , $ rawRoutes ) ; if ( isset ( $ grav [ 'admin' ] ) ) { // Remove current route from parents /** @var Admin $admin */ $ admin = $ grav [ 'admin' ] ; $ page = $ admin -> getPage ( $ admin -> route ) ; $ page_route = $ page -> route ( ) ; if ( isset ( $ parents [ $ page_route ] ) ) { unset ( $ parents [ $ page_route ] ) ; } } return $ parents ; }
Get available parents routes

@param bool $rawRoutes get the raw route or the normal route

@return array
Get available parents routes