Ublaboo\DataGrid\Column\Column::getSortNext PHP Method

getSortNext() public method

What sorting will be applied after next click?
public getSortNext ( ) : array
return array
    public function getSortNext()
    {
        if ($this->sort == 'ASC') {
            return [$this->key => 'DESC'];
        } else {
            if ($this->sort == 'DESC') {
                return [$this->key => FALSE];
            }
        }
        return [$this->key => 'ASC'];
    }

Usage Example

コード例 #1
0
ファイル: DataGrid.php プロジェクト: ublaboo/datagrid
 /**
  * @param Column  $column
  * @return array
  * @internal
  */
 public function getSortNext(\Ublaboo\DataGrid\Column\Column $column)
 {
     $sort = $column->getSortNext();
     if ($this->isMultiSortEnabled()) {
         $sort = array_merge($this->sort, $sort);
     }
     return array_filter($sort);
 }