/** * @param int $cat * * @return array * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException */ public function execute($cat) { if ($this->categoryRepository->resultExists($cat) === true) { $this->setCacheResponseCacheable($this->config->getSettings(Schema::MODULE_NAME)['cache_lifetime']); $category = $this->categoryRepository->getOneById($cat); $this->breadcrumb->append($this->translator->t('files', 'files'), 'files')->append($category['title']); $settings = $this->config->getSettings(FilesModule\Installer\Schema::MODULE_NAME); return ['dateformat' => $settings['dateformat'], 'files' => $this->filesRepository->getAllByCategoryId($cat, $this->date->getCurrentDateTime())]; } throw new Core\Controller\Exception\ResultNotExistsException(); }