assignSortings example

public function unserialize($serializedConditions)
    {
        return $this->reflector->unserialize($serializedConditions, 'Serialization error in Product stream');
    }

    private function prepareConditionStream(array $productStream, Criteria $criteria): void
    {
        $this->assignConditions($productStream$criteria);

        $sortings = $criteria->getSortings();
        if (empty($sortings)) {
            $this->assignSortings($productStream$criteria);
        }
    }

    private function prepareSelectionStream(array $productStream, Criteria $criteria): void
    {
        $productIds = $this->getProductIds((int) $productStream['id']);
        $criteria->addBaseCondition(new ProductIdCondition($productIds));

        $sortings = $criteria->getSortings();
        if (empty($sortings)) {
            $this->assignSortings($productStream$criteria);
        }
Home | Imprint | This part of the site doesn't use cookies.