|
|
@@ -66,4 +66,15 @@ class EditController extends Controller
|
|
66
|
66
|
);
|
|
67
|
67
|
}
|
|
68
|
68
|
|
|
|
69
|
+ public function deleteAction($playlist_id)
|
|
|
70
|
+ {
|
|
|
71
|
+ if (!($playlist = $this->getPlaylistManager()->findOwnedPlaylistWithId($playlist_id, $this->getUser())))
|
|
|
72
|
+ throw $this->createNotFoundException();
|
|
|
73
|
+
|
|
|
74
|
+ $this->remove($playlist);
|
|
|
75
|
+ $this->flush();
|
|
|
76
|
+ $this->setFlash('success', 'playlist.delete.success');
|
|
|
77
|
+ return $this->redirect($this->generateUrl('playlists_user', array('user_slug' => $this->getUser()->getSlug())));
|
|
|
78
|
+ }
|
|
|
79
|
+
|
|
69
|
80
|
}
|