public function actionDelete($id) { $this->template->project = $project = $this->project->get($id); if (!$project) { $this->flashMessage($this->translator->translate('project.not_found'), 'warning'); $this->redirect('default'); } $this['deleteForm']->setDefaults(['id' => $id]); }