예제 #1
0
 /**
  * @param int $id
  *
  * @return array
  * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
  */
 public function execute($id)
 {
     $newsletter = $this->newsletterRepository->getOneByIdAndStatus($id, 1);
     if (!empty($newsletter)) {
         $this->setCacheResponseCacheable($this->config->getSettings(Schema::MODULE_NAME)['cache_lifetime']);
         $this->breadcrumb->append($this->translator->t('newsletter', 'index'), 'newsletter')->append($this->translator->t('newsletter', 'frontend_archive_index'), 'newsletter/archive')->append($newsletter['title']);
         return ['newsletter' => $newsletter];
     }
     throw new Core\Controller\Exception\ResultNotExistsException();
 }