/** * @param int $id * * @return array * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException */ public function execute($id) { if ($this->articleRepository->resultExists($id, $this->date->getCurrentDateTime()) === true) { $this->setCacheResponseCacheable($this->config->getSettings(Schema::MODULE_NAME)['cache_lifetime']); $article = $this->articlesCache->getCache($id); $this->breadcrumb->replaceAncestor($article['title'], '', true); return ['page' => array_merge($article, $this->pageBreaksHelper->splitTextIntoPages($this->view->fetchStringAsTemplate($article['text']), $this->request->getUriWithoutPages()))]; } throw new Core\Controller\Exception\ResultNotExistsException(); }
/** * @inheritdoc */ public function splitTextIntoPages($text, $baseUrlPath) { $pages = parent::splitTextIntoPages($text, $baseUrlPath); $this->metaStatements->setNextPage($pages['next']); $this->metaStatements->setPreviousPage($pages['previous']); return $pages; }