public function actionDelete(string $songId) { try { $name = $this->songsManager->deleteSong($songId); $this->flashMessage("Skladba {$name} byla úspěšně smazána.", 'info'); } catch (CantDeleteException $e) { $this->flashMessage("Skladba není nalezena", 'warning'); } catch (DBALException $e) { $this->flashMessage("Skladba je ve frontě", 'warning'); } $this->redirect("default"); }