/** * Removes the given tag objTagControllerect from the tag repository * * @param \Lelesys\Plugin\News\Domain\Model\Tag $tag The tag to delete * @return void */ public function deleteAction(\Lelesys\Plugin\News\Domain\Model\Tag $tag) { try { $this->tagService->delete($tag); $header = 'Deleted a tag.'; $message = $this->translator->translateById('lelesys.plugin.news.delete.tag', array(), NULL, NULL, 'Main', $packageKey); $this->addFlashMessage($message, $header, \TYPO3\Flow\Error\Message::SEVERITY_OK); $this->redirect('index'); } catch (Lelesys\Plugin\News\Domain\Service\Exception $exception) { $header = 'Sorry, error occured. Please try again later.'; $message = $this->translator->translateById('lelesys.plugin.news.try.again', array(), NULL, NULL, 'Main', $packageKey); $this->addFlashMessage($message, $header, \TYPO3\Flow\Error\Message::SEVERITY_ERROR); } }