/**
  * Updates the given news object
  *
  * @param \Lelesys\Plugin\News\Domain\Model\News $news The news to update
  * @param array $media The media
  * @param array $file The file
  * @param array $relatedLink News related links
  * @param array $tags The tag
  * @return void
  */
 public function updateAction(\Lelesys\Plugin\News\Domain\Model\News $news, $media, $file, $relatedLink, $tags)
 {
     $packageKey = $this->settings['flashMessage']['packageKey'];
     try {
         $this->newsService->update($news, $media, $file, $relatedLink, $tags);
         $header = 'Updated the news.';
         $message = $this->translator->translateById('lelesys.plugin.news.update.news', 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 = 'Cannot update news at this time!!.';
         $message = $this->translator->translateById('lelesys.plugin.news.cannot.update', array(), NULL, NULL, 'Main', $packageKey);
         $this->addFlashMessage($message, $header, \TYPO3\Flow\Error\Message::SEVERITY_ERROR);
     }
 }