/** * Removes the tag of news * * @param string $newsId * @param string $tagId * @return void */ public function removeTagAction($newsId, $tagId) { try { $tag = $this->tagService->findById($tagId); $news = $this->newsService->findById($newsId); $this->newsService->removeTag($tag, $news); echo json_encode(1); exit; } catch (Lelesys\Plugin\News\Domain\Service\Exception $exception) { $packageKey = $this->settings['flashMessage']['packageKey']; $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); } }