public function endTasksInWork() { $session = SessionRegistry::instance(); $user = $session->getCurrentUser(); $tasksModel = new Tasks(); $userTasks = $tasksModel->getMyTasks($user); foreach ($userTasks as $task) { $this->endWork($task['id']); } }
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); } }