/** * 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; } }
public function setPageObject(Page $c) { $this->cID = $c->getCollectionPointerOriginalID() > 0 ? $c->getCollectionPointerOriginalID() : $c->getCollectionID(); }
/** * Get the original cID of a page. * * @return int */ public function getCollectionPointerOriginalID() { return parent::getCollectionPointerOriginalID(); }