Exemplo n.º 1
0
 public function endTasksInWork()
 {
     $session = SessionRegistry::instance();
     $user = $session->getCurrentUser();
     $tasksModel = new Tasks();
     $userTasks = $tasksModel->getMyTasks($user);
     foreach ($userTasks as $task) {
         $this->endWork($task['id']);
     }
 }
Exemplo n.º 2
0
 public function showallAction()
 {
     $user = $this->session->getCurrentUser();
     $tasksModel = new Tasks();
     $this->view->user = $user;
     $projectsId = $this->request->getProperty('projects_id');
     if (!is_null($projectsId)) {
         $this->view->tasks = $tasksModel->getMyTasks($user, (int) $projectsId);
     } else {
         $this->view->tasks = $tasksModel->getMyTasks($user);
     }
 }