public function all($id = null, $limit = 6) { $this->setPresenter(); if (!is_null($id)) { return $this->repository->findWhere(['project_id' => $id]); } return $this->repository->recentTasks(Authorizer::getResourceOwnerId(), $limit); }