Ojs\ApiBundle\Controller\Journal\JournalArticleFileRestController::getFilesAction PHP Method

getFilesAction() public method

List all ArticleFiles.
public getFilesAction ( FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array
$paramFetcher FOS\RestBundle\Request\ParamFetcherInterface param fetcher service
return array
    public function getFilesAction(ParamFetcherInterface $paramFetcher)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('VIEW', $journal, 'articles')) {
            throw new AccessDeniedException();
        }
        $articleFileHandler = $this->container->get('ojs_api.journal_article_file.handler');
        $offset = $paramFetcher->get('offset');
        $offset = null === $offset ? 0 : $offset;
        $limit = $paramFetcher->get('limit');
        return $articleFileHandler->all($limit, $offset);
    }