Example #1
0
 public function __construct(Page $startingParentPage, Page $currentPage = null)
 {
     parent::__construct();
     $this->startingParentPage = $startingParentPage;
     if (is_object($currentPage)) {
         $this->trail = array($currentPage->getCollectionID());
         $cParentID = Page::getCollectionParentIDFromChildID($currentPage->getCollectionID());
         while ($cParentID > 0) {
             $this->trail[] = $cParentID;
             $cParentID = Page::getCollectionParentIDFromChildID($cParentID);
         }
     }
     // pop off the dashboard node
     array_pop($this->trail);
     $this->currentPage = $currentPage;
 }
Example #2
0
 /**
  * Get the Parent cID from a page by using a cID.
  *
  * @param int $cID
  *
  * @return int
  */
 public function getCollectionParentIDFromChildID($cID)
 {
     return parent::getCollectionParentIDFromChildID($cID);
 }