public function addOrder($column, $order = self::ORDER_ASC): void
    {
        if (!$this->checkOrderColumn($column)) {
            throw new GridException("Order for column `$column` is not allowed");
        }

        if (!$this->checkOrderName($order)) {
            throw new GridException("Order name for column `$column` is incorrect");
        }

        $this->orders[$column] = $order;
    }
public function addOrder($column, $order = self::ORDER_ASC): void
    {
        if (!$this->checkOrderColumn($column)) {
            throw new GridException("Order for column `$column` is not allowed");
        }

        if (!$this->checkOrderName($order)) {
            throw new GridException("Order name for column `$column` is incorrect");
        }

        $this->orders[$column] = $order;
    }
public function addOrder ( $ column , $ order = self :: ORDER_ASC ) : void { if ( ! $ this -> checkOrderColumn ( $ column ) ) { throw new GridException ( "Order for column `$column` is not allowed" ) ; } if ( ! $ this -> checkOrderName ( $ order ) ) { throw new GridException ( "Order name for column `$column` is incorrect" ) ; } $ this -> orders [ $ column ] = $ order ; }
Add order rule

@param  string $column
@param  string $order

@return void
@throws GridException
Add order rule