/** * Checks for the news in the current plugin request * * @return \TYPO3\Flow\Persistence\QueryResultInterface The query result */ public function getNewsFromCurrentRequest() { $pluginArguments = $this->tsRuntime->getControllerContext()->getRequest()->getPluginArguments(); if (!empty($pluginArguments)) { foreach ($pluginArguments as $arguments) { if (!empty($arguments['@package']) && $arguments['@package'] === 'Lelesys.Plugin.News' && $arguments['@controller'] === 'News' && $arguments['@action'] === 'show' && !empty($arguments['news']['__identity'])) { return $this->newsService->findById($arguments['news']['__identity']); } } } }
/** * Downloads the file * * @param array $file * @return void */ public function downloadFileAction(array $file) { $this->newsService->downloadFile($file); }