/** * Determines whether a page should be accepted when iterating * * @param Zym_Navigation_Page $page page to check * @param bool $recursive [optional] whether it should check recursively */ protected function _accept(Zym_Navigation_Page $page, $recursive = true) { // accept by default $accept = true; if (!$page->isVisible($recursive)) { // don't accept invisible pages $accept = false; } elseif (!$this->_acceptAcl($page, $recursive)) { // acl is not amused $accept = false; } return $accept; }
/** * Determines whether a page should be accepted when iterating * * @param Zym_Navigation_Page $page page to verify */ protected function _accept(Zym_Navigation_Page $page, $recursive = true) { if (!$page->isVisible($recursive)) { // don't accept invisible pages return false; } if (null !== $this->_acl) { // determine using ACL return $this->_acceptAcl($page, $recursive); } // accept by default return true; }