Add column with drag handler on each row.
Drag handler allow to reorder table via drag n drop.

@return TableColumn\Generic
14575
public function addDragHandler()
    {
        $handler = $this->table->addColumn(null, 'DragHandler');
        // Move last column to the beginning in table column array.
        array_unshift($this->table->columns, array_pop($this->table->columns));

        return $handler;
    }
919113
public function addColumn($width)
    {
        $column = new PHPRtfLite_Table_Column($this, $this->getColumnsCount() + 1, $width);
        $this->_columns[] = $column;

        return $column;
    }
764861
public function cols(array $cols)
    {
        if ($this->type == 'SELECT') {
            foreach ($cols as $key => $val) {
                $this->addColSELECT($key, $val);
            }
            return $this;
        }
        return $this->addCols($cols);
    }
1245636
public function dataTable()
    {
        return (new EloquentDataTable($this->query()))
            ->addColumn('menus', function (Navigation $nav) {
                return '<span class="badge label-primary">' . $nav->menus()->count() . '</span>';
            })
            ->editColumn('title', function (Navigation $navigation) {
                return html()->linkRoute('administrator.navigation.edit', $navigation->title, $navigation);
            })
            ->addColumn('action', function (Navigation $nav) {
                return view('administrator.navigation.datatables.action', $nav->toArray());
            })
            ->rawColumns(['menus', 'published', 'action'])
            ->editColumn('published', function (Navigation $row) {
                return dt_check($row->published);
            });
    }
219743
public function addColumn($col)
    {
        if ($col instanceof Column) {

            if (isset($this->columnsByName[$col->getName()])) {
                throw new EngineException(sprintf('Column "%s" declared twice in table "%s"', $col->getName(), $this->getName()));
            }

            $col->setTable($this);

            if ($col->isInheritance()) {
                $this->inheritanceColumn = $col;
            }

            $this->columns[] = $col;
            $this->columnsByName[$col->getName()] = $col;
            $this->columnsByLowercaseName[strtolower($col->getName())] = $col;
            $this->columnsByPhpName[$col->getPhpName()] = $col;
            $col->setPosition(count($this->columns));

            if ($col->requiresTransactionInPostgres()) {
                $this->needsTransactionInPostgres = true;
            }

            return $col;
        }

        $column = new Column();
        $column->setTable($this);
        $column->loadMapping($col);

        return $this->addColumn($column); // call self w/ different param
    }
173308
public function addSort($column, $order = self::ASC)
    {
        if ($order != self::DESC) {
            $order = self::ASC;
        }

        $this->sort[$column] = $order;

        return $this;
    }
293428
public static function handlersSelectOptions()
    {
        return Yii::$app->cache->lazy(function () {
            $query = (new Query)
                ->select(['name', 'id'])
                ->from(PropertyHandlers::tableName())
                ->orderBy(['sort_order' => SORT_ASC])
                ->indexBy('id');
            $handlers = Module::getInstance()->handlersList;
            if (count($handlers) > 0) {
                $query->where(['class_name' => $handlers]);
            }
            return $query->column();
        }, 'PropertyHandlerId2Name', 86400, PropertyHandlers::commonTag());
    }
361495
public function addColumn(array $attributes)
    {
        $query  = $this->getQuery();
        $orders = $query instanceof \Illuminate\Database\Eloquent\Builder ? $query->getQuery()->orders : null;
        if (!isset($this->attributes['order']) and ! is_null($query) and ! is_null($orders)) {
            foreach ($orders as $order) {
                if ($order['column'] != $attributes['name']) {
                    continue;
                }
                $this->attributes['order'] = [
                    $this->collection->count(), $order['direction']
                ];
            }
        }
        $path = uri();
        $this->dispatcher->fire('datatables:' . $path . ':column.' . $attributes['name'], [&$attributes]);
        $this->dispatcher->fire(new \Antares\Events\Datatables\Column($path, $attributes['name'], $attributes));
        $this->collection->push(new Column($attributes));
        $this->dispatcher->fire('datatables:' . $path . ':after.' . $attributes['name'], $this);
        $this->dispatcher->fire(new AfterColumn($path, $attributes['name'], $this));
        return $this;
    }
14883
private function setSelectFrom()
    {
        foreach ($this->selectColumns as $key => $value) {
            $this->qb->addSelect($key);
        }

        $this->qb->from($this->entity, $this->tableName);

        return $this;
    }
674440
public function columns()
    {
        $args = func_get_args();
        while ($arg = array_shift($args)) {
            $this->columns->add($arg);
        }
        return $this;
    }
106636
public function modifyTable()
    {
        $table = $this->getTable();

        if (!$table->containsColumn($this->getParameter('rank_column'))) {
            $table->addColumn(array(
                'name' => $this->getParameter('rank_column'),
                'type' => 'INTEGER'
            ));
        }
        if ($this->useScope() && !$this->hasMultipleScopes() &&
             !$table->containsColumn($this->getParameter('scope_column'))) {
            $table->addColumn(array(
                'name' => $this->getParameter('scope_column'),
                'type' => 'INTEGER'
            ));
        }

        if ($this->useScope()) {
            $scopes = $this->getScopes();
            if (0 === count($scopes)) {
                throw new \InvalidArgumentException(sprintf(
                    'The sortable behavior in `%s` needs a `scope_column` parameter.',
                    $this->getTable()->getName()
                ));
            }
            foreach ($scopes as $scope) {
                $keys = $table->getColumnForeignKeys($scope);
                foreach ($keys as $key) {
                    if ($key->isForeignPrimaryKey() && $key->getOnDelete() == ForeignKey::SETNULL) {
                        $foreignTable = $key->getForeignTable();
                        $relationBehavior = new SortableRelationBehavior();
                        $relationBehavior->addParameter(array('name' => 'foreign_table', 'value' => $table->getName()));
                        $relationBehavior->addParameter(array('name' => 'foreign_scope_column', 'value' => $scope));
                        $relationBehavior->addParameter(array('name' => 'foreign_rank_column', 'value' => $this->getParameter('rank_column')));
                        $foreignTable->addBehavior($relationBehavior);
                    }
                }
            }
        }
    }
391632
public function setClassForString(Callable $handler): ColumnInterface
    {
        $this->key = self::ACTION_STRING_TR;
        $this->setHandler($handler);

        return $this;
    }
486224
public function build()
    {
        $this->checkName();
        $this->checkCallable();
        $this->checkOrderable();
        $this->checkSearchable();

        return new ColumnConfiguration($this->name, $this->callable, $this->searchable, $this->orderable);
    }
181718
public function tableColumns($tableColumns = null)
    {
        if ($tableColumns === null)
        {
            return $this->_tableColumns;
        }
        $this->_tableColumns = $tableColumns;

        return $this;
    }
261568
public function reloadTableSchema()
    {
        $this->columns = [];

        $described = $this->describe()->execute();
        while ($column = $described->get()) {
            $this->columns[] = $column['COLUMNS']['Field'];
        }

        return $this;
    }
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;
    }
127146
public function addColumn(Column\Column $column)
    {
        // Join column to the table
        $column->setTable($this);

        // Add renderer to column if it didn't has one
        if (!$column->hasRenderer()) {
            $column->setRenderer($this->getRenderer());
        }

        $this->columns[$column->getName()] = $column;

        return $this;
    }