Sort column setter

@param string $column
@return Table
349549
public function setSortColumn($column)
    {
        $this->sortColumn = null;

        $found = false;
        foreach ($this->getColumns() as $id => $params) {
            if ($id == $column) {
                $found = ($params['sortable'] === true);
                break;
            }
        }

        if ($found)
            $this->sortColumn = $column;

        return $this;
    }
57236
public static function adjustColumnName($column)
    {
        if (isset(self::$columnsMap[$column])) {
            $column = self::$columnsMap[$column];
        }
        return $column;
    }
310145
public function sort(Table $table)
    {
        $column = $table->getSortColumn();
        $dir = $table->getSortDir();

        if (!$column)
            return;

        $sqlId = null;
        foreach ($table->getColumns() as $id => $params) {
            if ($id == $column) {
                $sqlId = $params['sql_id'];
                break;
            }
        }

        if (!$sqlId)
            throw new \Exception("No 'sql_id' for column: $column");

        $this->sqlOrderBy = $sqlId . " " . $dir;
        return $this;
    }
1292980
public function setSortColumns(array $columns)
    {
        $this->sortColumns = [];
        $this->mappingSortColumns = [];

        foreach ($columns as $i => $column) {
            if (!isset($column['name'])) {
                throw new InvalidArgumentException('The "name" property of sort column must be present ("sort" property is optional)');
            }

            if (isset($column['sort']) && 'asc' !== $column['sort'] && 'desc' !== $column['sort']) {
                throw new InvalidArgumentException('The "sort" property of sort column must have "asc" or "desc" value');
            }

            if ($this->isSorted($column['name'])) {
                throw new InvalidArgumentException(sprintf('The "%s" column is already sorted', $column['name']));
            }

            $this->sortColumns[] = $column;
            $this->mappingSortColumns[$column['name']] = $i;
        }

        return $this;
    }
70358
public function addOrderBy($column, $sort = null)
        {
            if (is_array($column)) {
                foreach ($column as $single_column) {
                    $this->addOrderBy($single_column[0], $single_column[1]);
                }
            } else {
                $this->sort_orders[] = new QueryColumnSort($column, $sort);
            }

            return $this;
        }
1082579
public function columns(string $column, string ...$columns)
    {
        array_unshift($columns, $column);

        foreach ($columns as $column) {
            $this->column($column);
        }

        return $this;
    }
1346882
public function groupBy(string $column)
    {
        $instance = $this->groupByStrategyInstance();

        $instance->groupByStrategy()->groupBy($column);

        return $instance;
    }
848392
public function set_sortable_columns($columns)
    {
        if (! empty($this->sortable_columns)) {
            $columns = \array_merge($columns, $this->sortable_columns);
        }

        return $columns;
    }
452560
public function orderBy($column, $direction = 'ASC')
    {
        $orderVal         = [
            'ASC'  => 1,
            'DESC' => -1,
        ];
        $this->ordering[] = [
            'column'    => $column,
            'direction' => $orderVal[strtoupper($direction)],
        ];

        return $this;
    }
1093874
public function orWhereIsNot(string $column)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereIsNot($column);

        return $instance;
    }
600711
final public function groupBy($column)
    {
        $column = $this->formatColumn($column);
        $this->_sql['group'][] = $column;
        return $this;
    }
1271255
protected function isSortable($column = null)
    {
        if ($column === null) {
            return (count($this->getSortableColumns()) > 0);
        }

        return array_key_exists($column, $this->getSortableColumns());
    }
457592
public function orderBy($column, $order = 'asc')
    {
        $this->order[0] = $column;
        $this->order[1] = strtolower($order) == 'desc' ? 'desc' : 'asc';
        return $this;
    }
407775
protected function getFieldByColumn($column)
    {
        return $this->builder->fields()->first(
            function (Field $field) use ($column) {
                if (is_array($field->column())) {
                    return in_array($column, $field->column(), true);
                }

                return $field->column() === $column;
            }
        );
    }
1334261
public function orderBy($column, $order = Order::ASC)
    {
        $this->orders[] = [$column, $order];
        return $this;
    }
463205
public static function orderColumns($table, $columns)
    {
        // If no columns given, return table as-is
        if (!$columns) {
            return $table;
        }

        // Order
        $result = [];
        foreach ($columns as $column) {
            if (array_key_exists($column, $table)) {
                $result[$column] = $table[$column];
            }
        }

        return $result;
    }
172112
public function orHavingIsNull(string $column)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->orHavingIsNull($column);

        return $instance;
    }