src/ListBuilder.php
protected function mergeOptions()
    {
        $options = $this->getOptions();
        $sorter = $options['sorter'];
        $sorterNames = $this->getSorterParams();

        $this->setFilters($this->listRequest->getFilters(
            $this->getName(),
            $this->getFilterSource()
        ));

        $requestSorter = $this->listRequest->getSorter(
            isset($sorterNames['asc']) ? $sorterNames['asc'] : 'asc',
            isset($sorterNames['desc']) ? $sorterNames['desc'] : 'desc'
        );

        if (isset($requestSorter['name'])) {
            $sorter['name'] = $requestSorter['name'];
        }

        if (isset($requestSorter['type'])) {
            $sorter['type'] = $requestSorter['type'];
        }

        $this->setSorter($sorter['name'], $sorter['type']);

        return $this;
    }
protected function mergeOptions()
    {
        $options = $this->getOptions();
        $sorter = $options['sorter'];
        $sorterNames = $this->getSorterParams();

        $this->setFilters($this->listRequest->getFilters(
            $this->getName(),
            $this->getFilterSource()
        ));

        $requestSorter = $this->listRequest->getSorter(
            isset($sorterNames['asc']) ? $sorterNames['asc'] : 'asc',
            isset($sorterNames['desc']) ? $sorterNames['desc'] : 'desc'
        );

        if (isset($requestSorter['name'])) {
            $sorter['name'] = $requestSorter['name'];
        }

        if (isset($requestSorter['type'])) {
            $sorter['type'] = $requestSorter['type'];
        }

        $this->setSorter($sorter['name'], $sorter['type']);

        return $this;
    }
protected function mergeOptions ( ) { $ options = $ this -> getOptions ( ) ; $ sorter = $ options [ 'sorter' ] ; $ sorterNames = $ this -> getSorterParams ( ) ; $ this -> setFilters ( $ this -> listRequest -> getFilters ( $ this -> getName ( ) , $ this -> getFilterSource ( ) ) ) ; $ requestSorter = $ this -> listRequest -> getSorter ( isset ( $ sorterNames [ 'asc' ] ) ? $ sorterNames [ 'asc' ] : 'asc' , isset ( $ sorterNames [ 'desc' ] ) ? $ sorterNames [ 'desc' ] : 'desc' ) ; if ( isset ( $ requestSorter [ 'name' ] ) ) { $ sorter [ 'name' ] = $ requestSorter [ 'name' ] ; } if ( isset ( $ requestSorter [ 'type' ] ) ) { $ sorter [ 'type' ] = $ requestSorter [ 'type' ] ; } $ this -> setSorter ( $ sorter [ 'name' ] , $ sorter [ 'type' ] ) ; return $ this ; }
Merge filters and sorter options from
builder and list request.

@return self
Merge filters and sorter options from builder and list request .