/** * Initialise the {@link SiteNavigation} object * * The {@link SiteNavigation} object implements a Singleton pattern, and controls * the access to navigation items, as well as the process of printing them to the * output. * @param force_reload - reload the navigation item even if one is already registered */ public function siteNavigationInit($force_reload = false) { if (!SiteNavigation::ready() || $force_reload) { $ret = SiteNavigation::init($this->user->getHandlerTree()); } else { $ret = SiteNavigation::current(); } return $ret; }
/** * Return the current SiteNavigation object for this site * @param supress_error - default 'false', set true if no error * should be generated if a SiteNavigation * object cannot be found * @access public * @throws Exception - in the case that no site navigation is registered */ function getSiteNavigation() { if (!($ret = SiteNavigation::current())) { throw new Exception('Unable to find registered SiteNavigation object in getNavigation, display.class.inc'); } return $ret; }