generateSorting example


        foreach ($criteria->getConditions() as $condition) {
            $handler = $this->getConditionHandler($condition);
            $handler->generateCondition($condition$query$context);
        }
    }

    private function addSorting(Criteria $criteria, QueryBuilder $query, ShopContextInterface $context)
    {
        foreach ($criteria->getSortings() as $sorting) {
            $handler = $this->getSortingHandler($sorting);
            $handler->generateSorting($sorting$query$context);
        }
        $query->addOrderBy('variant.id', 'ASC');
    }

    /** * @throws Exception * * @return SortingHandlerInterface */
    private function getSortingHandler(SortingInterface $sorting)
    {
        
Home | Imprint | This part of the site doesn't use cookies.