コード例 #1
0
 public function indexAction()
 {
     $projectsModel = new Projects();
     $user = $this->session->getCurrentUser();
     if ($user->roles_id == 1) {
         $this->view->projects = $projectsModel->getProjectsDatasAll();
     } else {
         $this->view->projects = $projectsModel->getProjectsDatasByUsersId($user->id);
     }
     $this->view->user = $user;
 }