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