getUser($request), $resource)) { throw new AuthorizationFailedException(); } list($offset, $limit) = $this->getOffsetAndLimit(); return $this->getPaginatedContentResponse( $resource->children->limit($offset, $limit), count($resource->children) ); } }