public function getPostsAction(Request $request, ParamFetcherInterface $paramFetcher) { if (!$this->isGranted('VIEW', new AdminPost())) { throw new AccessDeniedException(); } $offset = $paramFetcher->get('offset'); $offset = null === $offset ? 0 : $offset; $limit = $paramFetcher->get('limit'); return $this->container->get('ojs_api.post.handler')->all($limit, $offset); }