public function createComponentMenu() { $navigation = parent::createComponentMenu(); $navigation->add('Calendar', $this->link('Default:default')); $navigation->add('My courses', $this->link('MyCourses:default')); return $navigation; }
public function startup() { parent::startup(); $user = Environment::getUser(); if ($user->isAuthenticated()) { $roles = Environment::getUser()->getIdentity()->getRoles(); $role = $roles[0]; $this->redirect(":{$role}:Default:default"); } }
public function createComponentMenu($name) { $navigation = parent::createComponentMenu($name); $navigation->add('Tables', $this->link('Tables:default'))->add('Assign', $this->link('Assign:assign'))->add('Settings', $this->link('Settings:default')); $tables = $this->model('tables')->getAllTables(); foreach ($tables as $table) { $navigation->get('Tables')->add(String::capitalize($table), $this->link('Tables:', array('table' => $table))); } $navigation->get('Assign')->add('Teachers and courses', $this->link('Assign:TeachersAndCourses'))->add('Students and courses', $this->link('Assign:StudentsAndCourses')); return $navigation; }
public function createComponentMenu() { $navigation = parent::createComponentMenu(); $navigation->add('Dashboard', $this->link('Default:default'))->add('Exam terms', $this->link('ExamTerms:default')); /* foreach ($this->teacher->courses as $course) { $navigation->get('Courses')->add($course->name, $this->link('Courses:courseDetails', array('course' => $course->id))); } */ return $navigation; }