Sulu\Bundle\ResourceBundle\Controller\FilterController::getListRepresentation PHP Метод

getListRepresentation() приватный Метод

Returns a list representation.
private getListRepresentation ( Request $request ) : ListRepresentation
$request Symfony\Component\HttpFoundation\Request
Результат Sulu\Component\Rest\ListBuilder\ListRepresentation
    private function getListRepresentation($request)
    {
        /** @var RestHelperInterface $restHelper */
        $restHelper = $this->get('sulu_core.doctrine_rest_helper');
        $locale = $this->getRequestParameter($request, 'locale', true);
        $fieldDescriptors = $this->getManager()->getListFieldDescriptors($locale);
        /** @var DoctrineListBuilderFactory $factory */
        $factory = $this->get('sulu_core.doctrine_list_builder_factory');
        $listBuilder = $factory->create(self::$entityName);
        $restHelper->initializeListBuilder($listBuilder, $fieldDescriptors);
        if ($request->get('context')) {
            $listBuilder->where($fieldDescriptors['context'], $request->get('context'));
        }
        // return all filters created by the user or without user
        $userCondition = [$this->getUser()->getId(), null];
        $listBuilder->in($fieldDescriptors['user'], $userCondition);
        $list = new ListRepresentation($listBuilder->execute(), self::$entityKey, 'get_filters', $request->query->all(), $listBuilder->getCurrentPage(), $listBuilder->getLimit(), $listBuilder->count());
        return $list;
    }