Controller/PageController.php
public function getPagesAction(ParamFetcherInterface $paramFetcher) {
        $manager = $this->get('doctrine_phpcr.odm.default_document_manager');
        $rawSorters = json_decode($paramFetcher->get("sort"), true);
        $sorters = array();
        foreach ($rawSorters as $s) {
            $sorters[$s['property']] = $s['direction'];
        }
        $rawFilters = json_decode($paramFetcher->get("filter"), true);
        $filters = array();
        foreach ($rawFilters as $f) {
            $filters[$f['property']] = $f['value'];
        }
        $start = 0;
        if ($paramFetcher->get("start") === "0") {
            if ($paramFetcher->get("page") > 1) {
                $start = ($paramFetcher->get("page")-1) * $paramFetcher->get("limit");
            }
        } else {
            $start = $paramFetcher->get("start");
        }
        $list = $manager->getRepository('ApplicationToguApplicationModelsBundle:Page')->findBy(
            $filters,
            $sorters,
            $paramFetcher->get("limit"),
            $start
        );
        $list = array_values($list->toArray());
        $context = $this->getSerializerContext(array('list'));
        $view = View::create($list, 200)->setSerializationContext($context);
        return $this->handleView($view);
    }
public function getPagesAction(ParamFetcherInterface $paramFetcher) {
        $manager = $this->get('doctrine_phpcr.odm.default_document_manager');
        $rawSorters = json_decode($paramFetcher->get("sort"), true);
        $sorters = array();
        foreach ($rawSorters as $s) {
            $sorters[$s['property']] = $s['direction'];
        }
        $rawFilters = json_decode($paramFetcher->get("filter"), true);
        $filters = array();
        foreach ($rawFilters as $f) {
            $filters[$f['property']] = $f['value'];
        }
        $start = 0;
        if ($paramFetcher->get("start") === "0") {
            if ($paramFetcher->get("page") > 1) {
                $start = ($paramFetcher->get("page")-1) * $paramFetcher->get("limit");
            }
        } else {
            $start = $paramFetcher->get("start");
        }
        $list = $manager->getRepository('ApplicationToguApplicationModelsBundle:Page')->findBy(
            $filters,
            $sorters,
            $paramFetcher->get("limit"),
            $start
        );
        $list = array_values($list->toArray());
        $context = $this->getSerializerContext(array('list'));
        $view = View::create($list, 200)->setSerializationContext($context);
        return $this->handleView($view);
    }
Get list of Page record
@param ParamFetcherInterface $paramFetcher

@QueryParam(name="page", requirements="\d+", default="1", description="Page of the list.")
@QueryParam(name="start", requirements="\d+", default="0", description="Offset of the list")
@QueryParam(name="limit", requirements="\d+", default="25", description="Number of record per fetch.")
@QueryParam(name="sort", description="Sort result by field in URL encoded JSON format", default="[]")
@QueryParam(name="filter", description="Search filter in URL encoded JSON format", default="[]")
@QueryParam(name="group", description="The JMS Serializer group", default="")
@QueryParam(name="depth", description="The depth to use for serialization", default="1")

@return \Symfony\Component\HttpFoundation\Response