/** * @param AssetCollection $assetCollection * @return void */ public function deleteAssetCollectionAction(AssetCollection $assetCollection) { if ($this->browserState->get('activeAssetCollection') === $assetCollection) { $this->browserState->set('activeAssetCollection', null); } $this->assetCollectionRepository->remove($assetCollection); $this->addFlashMessage('collectionHasBeenDeleted', '', Message::SEVERITY_OK, [htmlspecialchars($assetCollection->getTitle())]); $this->redirect('index'); }
/** * @param AssetCollection $assetCollection * @return void */ public function deleteAssetCollectionAction(AssetCollection $assetCollection) { if ($this->browserState->get('activeAssetCollection') === $assetCollection) { $this->browserState->set('activeAssetCollection', null); } $this->assetCollectionRepository->remove($assetCollection); $this->addFlashMessage(sprintf('Collection "%s" has been deleted.', $assetCollection->getTitle())); $this->redirect('index'); }