protected function processRequest()
    {
        /** @var \Zend\Http\PhpEnvironment\Request $request */
        $request = $this->sm->get('Request');
        $url = explode('?', $request->getRequestUri());
        $this->url = $url[0];
        $params = $request->getQuery();
        if ($params->get('page')) {
            //set page
            $this->setPage((int)$params->get('page'));
        }

        if ($params->get('limit')) {
            //set limit
            $this->setLimit((int)$params->get('limit'));
        }

        foreach ($this->allowedOrders as $column) {
            $columnMod = str_replace('.', '_', $column);
            $order = $params->get('order-' . $columnMod);

            if ($order) {
                $this->setOrder([
                    $column => $order
                ]);
            }
        }

        foreach ($this->allowedFilters as $column) {
            $columnMod = str_replace('.', '_', $column);
            $filter = $params->get('filter-' . $columnMod);
            if ($filter) {
                $this->setFilter([$column => $filter]);
            }
        }
    }
protected function processRequest()
    {
        /** @var \Zend\Http\PhpEnvironment\Request $request */
        $request = $this->sm->get('Request');
        $url = explode('?', $request->getRequestUri());
        $this->url = $url[0];
        $params = $request->getQuery();
        if ($params->get('page')) {
            //set page
            $this->setPage((int)$params->get('page'));
        }

        if ($params->get('limit')) {
            //set limit
            $this->setLimit((int)$params->get('limit'));
        }

        foreach ($this->allowedOrders as $column) {
            $columnMod = str_replace('.', '_', $column);
            $order = $params->get('order-' . $columnMod);

            if ($order) {
                $this->setOrder([
                    $column => $order
                ]);
            }
        }

        foreach ($this->allowedFilters as $column) {
            $columnMod = str_replace('.', '_', $column);
            $filter = $params->get('filter-' . $columnMod);
            if ($filter) {
                $this->setFilter([$column => $filter]);
            }
        }
    }
protected function processRequest ( ) { /** @var \Zend\Http\PhpEnvironment\Request $request */ $ request = $ this -> sm -> get ( 'Request' ) ; $ url = explode ( '?' , $ request -> getRequestUri ( ) ) ; $ this -> url = $ url [ 0 ] ; $ params = $ request -> getQuery ( ) ; if ( $ params -> get ( 'page' ) ) { //set page $ this -> setPage ( ( int ) $ params -> get ( 'page' ) ) ; } if ( $ params -> get ( 'limit' ) ) { //set limit $ this -> setLimit ( ( int ) $ params -> get ( 'limit' ) ) ; } foreach ( $ this -> allowedOrders as $ column ) { $ columnMod = str_replace ( '.' , '_' , $ column ) ; $ order = $ params -> get ( 'order-' . $ columnMod ) ; if ( $ order ) { $ this -> setOrder ( [ $ column => $ order ] ) ; } } foreach ( $ this -> allowedFilters as $ column ) { $ columnMod = str_replace ( '.' , '_' , $ column ) ; $ filter = $ params -> get ( 'filter-' . $ columnMod ) ; if ( $ filter ) { $ this -> setFilter ( [ $ column => $ filter ] ) ; } } }
Parses request and sets grid params
Parses request and sets grid params