public function addSortFilterParameters($sortName, $sortField, $nestedPath = null, $nestedFilter = null)
    {
        $sortParams = [];

        if (isset($this->_productLimitationFilters['sortParams'])) {
            $sortParams = $this->_productLimitationFilters['sortParams'];
        }

        $sortParams[$sortName] = [
            'sortField'    => $sortField,
            'nestedPath'   => $nestedPath,
            'nestedFilter' => $nestedFilter,
        ];

        $this->_productLimitationFilters['sortParams'] = $sortParams;

        return $this;
    }
public function addSortFilterParameters($sortName, $sortField, $nestedPath = null, $nestedFilter = null)
    {
        $sortParams = [];

        if (isset($this->_productLimitationFilters['sortParams'])) {
            $sortParams = $this->_productLimitationFilters['sortParams'];
        }

        $sortParams[$sortName] = [
            'sortField'    => $sortField,
            'nestedPath'   => $nestedPath,
            'nestedFilter' => $nestedFilter,
        ];

        $this->_productLimitationFilters['sortParams'] = $sortParams;

        return $this;
    }
public function addSortFilterParameters ( $ sortName , $ sortField , $ nestedPath = null , $ nestedFilter = null ) { $ sortParams = [ ] ; if ( isset ( $ this -> _productLimitationFilters [ 'sortParams' ] ) ) { $ sortParams = $ this -> _productLimitationFilters [ 'sortParams' ] ; } $ sortParams [ $ sortName ] = [ 'sortField' => $ sortField , 'nestedPath' => $ nestedPath , 'nestedFilter' => $ nestedFilter , ] ; $ this -> _productLimitationFilters [ 'sortParams' ] = $ sortParams ; return $ this ; }
Set param for a sort order.

@param string $sortName     Sort order name (eg. position, ...).
@param string $sortField    Sort field.
@param string $nestedPath   Optional nested path for the sort field.
@param array  $nestedFilter Optional nested filter for the sort field.

@return \Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection
Set param for a sort order .