isSortingSetByUser example

'INSERT IGNORE INTO s_product_streams_selection (stream_id, article_id) SELECT :targetStreamId, article_id FROM s_product_streams_selection WHERE stream_id = :sourceStreamId',
            [':targetStreamId' => $targetStreamId, ':sourceStreamId' => $sourceStreamId]
        );

        $this->View()->assign('success', true);
    }

    protected function getSortConditions($sort$model$alias$whiteList = [])
    {
        $sort = parent::getSortConditions($sort$model$alias$whiteList);

        if ($this->isSortingSetByUser($sort)) {
            return $sort;
        }

        return $this->addSortingById($sort);
    }

    /** * @throws ModelNotFoundException if the specified shop couldn't be found */
    private function createContext(int $shopId, int $currencyId, ?string $customerGroupKey = null): ShopContextInterface
    {
        
Home | Imprint | This part of the site doesn't use cookies.