public function setFiltersAndSort($filters, $sortField = null, $sortOrder = "ASC")
    {
        $this->reset();

        $this->filters = $filters;
        if ($sortField && $sortOrder) {
            $this->sort = [$sortField, $sortOrder];
        }

        return $this;
    }
public function setFiltersAndSort($filters, $sortField = null, $sortOrder = "ASC")
    {
        $this->reset();

        $this->filters = $filters;
        if ($sortField && $sortOrder) {
            $this->sort = [$sortField, $sortOrder];
        }

        return $this;
    }
public function setFiltersAndSort ( $ filters , $ sortField = null , $ sortOrder = "ASC" ) { $ this -> reset ( ) ; $ this -> filters = $ filters ; if ( $ sortField && $ sortOrder ) { $ this -> sort = [ $ sortField , $ sortOrder ] ; } return $ this ; }
Set filters & sorting to apply to the data.

@param array  $filters List of filters with the fallowing format :
['key_to_filter'=> ['type_of_filter' , 'wordl"]]
For the possible types of filters check FilterInstance constants.
Example to find a map or author containing the keyword "hello"
['name'=> ['like', 'hello"], 'author_loin'=> ['like', 'hello"]]
@param string $sortField Field to sort on
@param string $sortOrder Order DESC or ASC.

@return $this
Set filters & sorting to apply to the data .