have_perm('admin') && Config::get()->SCHEDULE_ENABLE) { $planerinfo = _('Stundenplan'); } else { $planerinfo = _('Termine'); } $this->setImage(Icon::create('schedule', 'navigation', ["title" => $planerinfo])); } /** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $perm, $atime; parent::initSubNavigation(); // schedule if (!$perm->have_perm('admin') && Config::get()->SCHEDULE_ENABLE) { $navigation = new Navigation(_('Stundenplan'), 'dispatch.php/calendar/schedule'); $this->addSubNavigation('schedule', $navigation); } // calendar $atime = $atime ? intval($atime) : Request::int($atime); if (Config::get()->CALENDAR_ENABLE) { $navigation = new Navigation(_('Terminkalender'), 'dispatch.php/calendar/single', ['self' => 1]); $this->addSubNavigation('calendar', $navigation); } } }