public function deleteAction(Asset $asset)
{
try {
$this->assetRepository->remove($asset);
$this->addFlashMessage('assetHasBeenDeleted', '', Message::SEVERITY_OK, [htmlspecialchars($asset->getLabel())]);
} catch (AssetServiceException $exception) {
$this->addFlashMessage('assetCouldNotBeDeleted', '', Message::SEVERITY_WARNING, [], 1462196565);
}
$this->redirect('index');
}