コード例 #1
0
 /**
  * @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');
 }
コード例 #2
0
 /**
  * @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');
 }