Exemple #1
0
 /**
  * Return column sort params
  *
  * @param bool $withFilterParams
  * @return array
  */
 public function getSortParams($withFilterParams = true)
 {
     $params = [];
     $sortParamName = $this->_grid->getSortParamName();
     $sortDirectionParamName = $this->_grid->getSortDirectionParamName();
     $params[$sortParamName] = $this->_key;
     $params[$sortDirectionParamName] = $this->toogleSortDirection();
     $limit = $this->_grid->getLimit();
     if ($limit != $this->_grid->getDefaultParam('limit')) {
         $limitParamName = $this->_grid->getLimitParamName();
         $params[$limitParamName] = $limit;
     }
     if ($withFilterParams) {
         $params += $this->_grid->getFilterParams();
     }
     return $params;
 }