Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
/** * Go throught tree upward to find all parents */ private static function getParents(SiteTree $page) { $parents = array(); $parent = $page->parent(); while ($parent && $parent->exists()) { array_push($parents, $parent); // Keep looping $parent = $parent->parent(); } return $parents; }