protected function getAnchorsInPage($id)
    {
        $page = SiteTree::get()->byID($id);

        if (!$page || !$page->canView()) {
            return [];
        }

        return $page->getAnchorsOnPage();
    }
protected function getAnchorsInPage($id)
    {
        $page = SiteTree::get()->byID($id);

        if (!$page || !$page->canView()) {
            return [];
        }

        return $page->getAnchorsOnPage();
    }
protected function getAnchorsInPage ( $ id ) { $ page = SiteTree :: get ( ) -> byID ( $ id ) ; if ( ! $ page || ! $ page -> canView ( ) ) { return [ ] ; } return $ page -> getAnchorsOnPage ( ) ; }
Get anchors in the given page ID.

@param int $id
@return array
Get anchors in the given page ID .