resolveSortParameter example


    protected function getList($filter$sort$offset$limit)
    {
        $sort = $this->resolveSortParameter($sort);

        if ($this->container->getParameter('shopware.es.backend.enabled')) {
            $repository = $this->container->get(AttributeOrderRepository::class);
            $criteria = $this->createCriteria();
            $result = $repository->search($criteria);

            $total = $result->getCount();
            $ids = array_column($result->getData(), 'id');
        } else {
            $searchResult = $this->getRepository()->search($offset$limit$filter$sort);
            $total = $searchResult['total'];
            
Home | Imprint | This part of the site doesn't use cookies.