src/Sulu/Bundle/ContactBundle/Controller/ContactController.php
private function getList(Request $request, $locale)
    {
        /** @var RestHelperInterface $restHelper */
        $restHelper = $this->getRestHelper();

        /** @var DoctrineListBuilderFactory $factory */
        $factory = $this->get('sulu_core.doctrine_list_builder_factory');

        $listBuilder = $factory->create($this->container->getParameter('sulu.model.contact.class'));
        $restHelper->initializeListBuilder($listBuilder, $this->getFieldDescriptors());

        $listResponse = $this->prepareListResponse($listBuilder, $locale);

        return new ListRepresentation(
            $listResponse,
            self::$entityKey,
            'get_contacts',
            $request->query->all(),
            $listBuilder->getCurrentPage(),
            $listBuilder->getLimit(),
            $listBuilder->count()
        );
    }
private function getList(Request $request, $locale)
    {
        /** @var RestHelperInterface $restHelper */
        $restHelper = $this->getRestHelper();

        /** @var DoctrineListBuilderFactory $factory */
        $factory = $this->get('sulu_core.doctrine_list_builder_factory');

        $listBuilder = $factory->create($this->container->getParameter('sulu.model.contact.class'));
        $restHelper->initializeListBuilder($listBuilder, $this->getFieldDescriptors());

        $listResponse = $this->prepareListResponse($listBuilder, $locale);

        return new ListRepresentation(
            $listResponse,
            self::$entityKey,
            'get_contacts',
            $request->query->all(),
            $listBuilder->getCurrentPage(),
            $listBuilder->getLimit(),
            $listBuilder->count()
        );
    }
private function getList ( Request $ request , $ locale ) { /** @var RestHelperInterface $restHelper */ $ restHelper = $ this -> getRestHelper ( ) ; /** @var DoctrineListBuilderFactory $factory */ $ factory = $ this -> get ( 'sulu_core.doctrine_list_builder_factory' ) ; $ listBuilder = $ factory -> create ( $ this -> container -> getParameter ( 'sulu.model.contact.class' ) ) ; $ restHelper -> initializeListBuilder ( $ listBuilder , $ this -> getFieldDescriptors ( ) ) ; $ listResponse = $ this -> prepareListResponse ( $ listBuilder , $ locale ) ; return new ListRepresentation ( $ listResponse , self :: $ entityKey , 'get_contacts' , $ request -> query -> all ( ) , $ listBuilder -> getCurrentPage ( ) , $ listBuilder -> getLimit ( ) , $ listBuilder -> count ( ) ) ; }
Returns list for cget.

@param Request $request
@param string $locale

@return ListRepresentation
Returns list for cget .