Example #1
0
 /**
  * Determines whether this nav item is the current page the user is on.
  *
  * @param \Concrete\Core\Page\Page $c The page object for the current page
  *
  * @return bool
  */
 public function isActive(&$c)
 {
     if ($c) {
         $cID = $c->getCollectionPointerID() > 0 ? $c->getCollectionPointerOriginalID() : $c->getCollectionID();
         return $cID == $this->cID;
     }
 }
Example #2
0
 public function setPageObject(Page $c)
 {
     $this->cID = $c->getCollectionPointerOriginalID() > 0 ? $c->getCollectionPointerOriginalID() : $c->getCollectionID();
 }
Example #3
0
 /**
  * Get the original cID of a page.
  *
  * @return int
  */
 public function getCollectionPointerOriginalID()
 {
     return parent::getCollectionPointerOriginalID();
 }