public function actionEdit(int $id) { if (!($this->entity = $this->repository->getById($id))) { $this->error(); } }