Exemplo n.º 1
0
 public function createComponentMenu()
 {
     $navigation = parent::createComponentMenu();
     $navigation->add('Calendar', $this->link('Default:default'));
     $navigation->add('My courses', $this->link('MyCourses:default'));
     return $navigation;
 }
Exemplo n.º 2
0
 public function startup()
 {
     parent::startup();
     $user = Environment::getUser();
     if ($user->isAuthenticated()) {
         $roles = Environment::getUser()->getIdentity()->getRoles();
         $role = $roles[0];
         $this->redirect(":{$role}:Default:default");
     }
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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;
 }