getProject(); if (! $this->helper->user->hasProjectAccess('TaskModificationController', 'update', $project['id'])) { throw new AccessForbiddenException(); } return $project; } private function sorter() { return new OrganonSortHelper($this->container); } private function backToBoard(array $project) { $this->response->redirect($this->helper->url->to('BoardViewController', 'show', array('project_id' => $project['id']))); } public function sort() { $this->checkCSRFParam(); $project = $this->authorize(); $this->sorter()->applySort( $project['id'], $this->request->getIntegerParam('swimlane_id'), $this->request->getIntegerParam('column_id'), $this->request->getStringParam('sort'), $this->request->getStringParam('direction') ); $this->backToBoard($project); } public function toggle() { $this->checkCSRFParam(); $project = $this->authorize(); $this->sorter()->toggle($project['id'], $this->request->getIntegerParam('column_id')); $this->backToBoard($project); } }