Use the column attribute for the destroy confirmation message generation (required).
This method can be called only once.

@return \Okipa\LaravelBootstrapTableList\TableListColumn
@throws ErrorException
343182
public function useForDestroyConfirmation(): TableListColumn
    {
        if (! $this->getAttribute('attribute')) {
            $errorMessage = 'You cannot use the « useForDestroyConfirmation() » method on a column which have no '
                            . 'defined attribute. Define a column attribute by setting '
                            . 'a string parameter in the « addColumn() » method.';
            throw new ErrorException($errorMessage);
        }
        $this->getAttribute('tableList')->getAttribute('destroyAttributes')->add($this->getAttribute('attribute'));

        return $this;
    }
712625
protected function getColumnIndex($field, string $error_message)
    {
        $method = is_string($field) ? 'getColumnIndexByValue' : 'getColumnIndexByKey';

        return $this->$method($field, $error_message);
    }
721656
public function setCheckbox(): ColumnInterface
    {
        return $this->setKey('checkbox')
            ->setValue('<input type="checkbox" class="js_adminSelectAll">')
            ->setSort(false)
            ->setScreening(true)
            ->setHandler(function ($data) {
                if ($data && $data->id) {
                    return '<input type="checkbox" class="js_adminCheckboxRow" value="' . $data->id . '">';
                }

                return '';
            });
    }
152289
protected function defineListColumns()
    {
        if (!isset($this->columns) || !is_array($this->columns) || !count($this->columns)) {
            $class = get_class($this->model instanceof Model ? $this->model : $this->controller);
            throw new ApplicationException(Lang::get('backend::lang.list.missing_columns', compact('class')));
        }

        $this->addColumns($this->columns);

        /**
         * @event backend.list.extendColumns
         * Provides an opportunity to modify the columns of a List widget
         *
         * Example usage:
         *
         *     Event::listen('backend.list.extendColumns', function($listWidget) {
         *         // Only for the User controller
         *         if (!$listWidget->getController() instanceof \Backend\Controllers\Users) {
         *             return;
         *         }
         *
         *         // Only for the User model
         *         if (!$listWidget->model instanceof \Backend\Models\User) {
         *             return;
         *         }
         *
         *         // Add an extra birthday column
         *         $listWidget->addColumns([
         *             'birthday' => [
         *                 'label' => 'Birthday'
         *             ]
         *         ]);
         *
         *         // Remove a Surname column
         *         $listWidget->removeColumn('surname');
         *     });
         *
         * Or
         *
         *     $listWidget->bindEvent('list.extendColumns', function () use ($listWidget) {
         *         // Only for the User controller
         *         if (!$listWidget->getController() instanceof \Backend\Controllers\Users) {
         *             return;
         *         }
         *
         *         // Only for the User model
         *         if (!$listWidget->model instanceof \Backend\Models\User) {
         *             return;
         *         }
         *
         *         // Add an extra birthday column
         *         $listWidget->addColumns([
         *             'birthday' => [
         *                 'label' => 'Birthday'
         *             ]
         *         ]);
         *
         *         // Remove a Surname column
         *         $listWidget->removeColumn('surname');
         *     });
         *
         */
        $this->fireSystemEvent('backend.list.extendColumns');

        /*
         * Use a supplied column order
         */
        if ($columnOrder = $this->getSession('order', null)) {
            $orderedDefinitions = [];
            foreach ($columnOrder as $column) {
                if (isset($this->allColumns[$column])) {
                    $orderedDefinitions[$column] = $this->allColumns[$column];
                }
            }

            $this->allColumns = array_merge($orderedDefinitions, $this->allColumns);
        }

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

        return new ColumnConfiguration($this->name, $this->callable, $this->searchable, $this->orderable);
    }
103087
public function dropColumn() {
        $columns = func_get_args();
        foreach ($columns as $column) {
            $this->set($column);
        }
        return $this->command()->execute($this->getDropColumnSql());
    }
993606
public function destroy()
    {
        if (!self::$_loaded) {
            self::_loadColumns();
        }

        $calling = get_called_class();

        if (!self::_checkCallback($calling, "before_destroy", $this)) {
            return false;
        }

        $table_name = $calling::getTableName();
        $pk         = $calling::isIgnoringCase() ? strtolower($calling::getPK()) : $calling::getPK();
        $pk_value   = $this->_data[$pk];
        $escape     = Driver::$escape_char;
        $sql        = "delete from $escape$table_name$escape where $escape$table_name$escape.$escape".self::$_mapping[$calling][$pk]."$escape=?";

        $rst = self::executePrepared($sql, array($pk_value))->rowCount()==1;
        if ($rst) {
            self::_checkCallback($calling, "after_destroy", $this);
        }
        return $rst;
    }
852493
public function isSortable(): TableListColumn
    {
        $this->getAttribute('tableList')->getAttribute('sortableColumns')->add($this);
        $this->setAttribute('isSortableColumn', true);

        return $this;
    }
1188727
private function validateRecord()
    {
        // Abort if beforeValidate() fails
        if ($this->fireModelEvent('validating') === false) return false;

        $validator = Validator::make($this->getAttributes(), $this->rules, $this->messages);
        $result = $validator->passes();

        // Update errors based on result
        $this->errors = ($result) ? new MessageBag : $validator->messages();

        $this->fireModelEvent('validated', false);

        return $result;
    }
1227860
public function destroy()
    {
        if (static::isVersioned()) {
            if (static::$createRevisionOnDestroy) {
                // save a copy to history table
                if ($this->fieldExists('Created')) {
                    $this->Created = time();
                }

                $recordValues = $this->_prepareRecordValues();
                $set = static::_mapValuesToSet($recordValues);

                DB::nonQuery(
                        'INSERT INTO `%s` SET %s',

                    [
                                static::getHistoryTable(),
                                join(',', $set),
                        ]
                );
            }
        }

        return static::delete($this->getPrimaryKeyValue());
    }
958887
public function revert()
    {
        $model = $this->getModel();
        unset( $model->{$model->getCreatedAtColumn()} );
        unset( $model->{$model->getUpdatedAtColumn()} );
        if (method_exists($model, 'getDeletedAtColumn')) {
            unset( $model->{$model->getDeletedAtColumn()} );
        }
        $model->save();
        return $model;
    }
1311667
public function getColumnModel(): ColumnModel
    {
        if ($this->source === null) {
            throw new Exception\RuntimeException(__METHOD__ . ' Prior to get column model, a source must be set.');
        }
        $this->hydrate_options_initialized = false;

        return $this->source->getColumnModel();
    }
563984
public void columnSelectionChanged(ListSelectionEvent e)
    {
        if (!e.getValueIsAdjusting())
        {
            int iColumn = m_jTableScreen.getSelectedColumn();
            if (iColumn != -1)
                if (m_thinTableModel != null)   // In case this was freed before I got the message
            {
                Convert converter = m_thinTableModel.getFieldInfo(iColumn);
                BaseApplet baseApplet = this.getBaseApplet();
                if (baseApplet != null)
                {
                    if (converter instanceof FieldInfo)
                        baseApplet.setStatusText(((FieldInfo)converter).getFieldTip());
                    else
                    {
                        TableColumnModel columnModel = m_jTableScreen.getTableHeader().getColumnModel();
                        TableColumn tableColumn = columnModel.getColumn(iColumn);
                        TableCellEditor editor = tableColumn.getCellEditor();
                        String strTip = null;
                        if (editor instanceof JComponent)
                        {
                            String strName = ((JComponent)editor).getName();
                            if (strName != null)
                            {
                                strName += Constants.TIP;
                                strTip = baseApplet.getString(strName);
                                if (strTip == strName)
                                    strTip = baseApplet.getString(((JComponent)editor).getName());
                            }
                        }
                        baseApplet.setStatusText(strTip);
                    }
                    String strLastError = baseApplet.getLastError(0);
                    if ((strLastError != null) && (strLastError.length() > 0))
                        baseApplet.setStatusText(strLastError);
                }
            }
        }
    }
1019107
public function reset()
    {
        $this->table = '';
        $this->columns = [];
        $this->joins = [];
        $this->wheres = [];
        $this->whereIn = [];
        $this->groupBy = false;
        $this->orderBy = false;
        $this->offset = 0;
        $this->limit = 10;
        $this->fields = [];
        return $this;
    }
448917
private function removeColumnsFromEntity()
    {
        $del = $this->getDeletes();

        if ($del) {
            foreach ($del as $id => $meta) {
                $this->dropKeysFromColumnRemoved($id, $meta);

                $sql = new SqlCommand();
                $sql->exeCommand("ALTER TABLE " . PRE . $this->entity . " DROP COLUMN " . $meta['column']);
            }
        }
    }
518022
public function &buildColumnList()
    {

        $str = "";
        $ct = 0;

        // Build Select Column List
        foreach ($this->columns as $k => $col) {
            if ($col->in_select) {
                if ($ct > 0) {
                    $str .= ",";
                }

                $str .= " ";

                if ($col->table_name) {
                    $str .= $col->table_name . ".";
                }

                $str .= $col->column_name;

                if (($col->query_name)) {
                    $str .= " " . $col->query_name;
                }

                $ct++;
            }
        }
        //die;
        return $str;
    }
298731
protected function getSelectColumnsSQL()
    {
        // Create the column list fragment only once
        if ($this->currentPersisterContext->selectColumnListSql !== null) {
            return $this->currentPersisterContext->selectColumnListSql;
        }

        $columnList         = array();
        $discrColumn        = $this->class->discriminatorColumn['name'];
        $baseTableAlias     = $this->getSQLTableAlias($this->class->name);
        $resultColumnName   = $this->platform->getSQLResultCasing($discrColumn);

        $this->currentPersisterContext->rsm->addEntityResult($this->class->name, 'r');
        $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
        $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumn);

        // Add regular columns
        foreach ($this->class->fieldMappings as $fieldName => $mapping) {
            $class = isset($mapping['inherited'])
                ? $this->em->getClassMetadata($mapping['inherited'])
                : $this->class;

            $columnList[] = $this->getSelectColumnSQL($fieldName, $class);
        }

        // Add foreign key columns
        foreach ($this->class->associationMappings as $mapping) {
            if ( ! $mapping['isOwningSide'] || ! ($mapping['type'] & ClassMetadata::TO_ONE)) {
                continue;
            }

            $tableAlias = isset($mapping['inherited'])
                ? $this->getSQLTableAlias($mapping['inherited'])
                : $baseTableAlias;

            foreach ($mapping['targetToSourceKeyColumns'] as $srcColumn) {
                $className = isset($mapping['inherited'])
                    ? $mapping['inherited']
                    : $this->class->name;

                $targetClass = $this->em->getClassMetadata($mapping['targetEntity']);

                $columnList[] = $this->getSelectJoinColumnSQL(
                    $tableAlias,
                    $srcColumn,
                    $className,
                    PersisterHelper::getTypeOfColumn(
                        $mapping['sourceToTargetKeyColumns'][$srcColumn],
                        $targetClass,
                        $this->em
                    )
                );
            }
        }

        // Add discriminator column (DO NOT ALIAS, see AbstractEntityInheritancePersister#processSQLResult).
        $tableAlias = ($this->class->rootEntityName == $this->class->name)
            ? $baseTableAlias
            : $this->getSQLTableAlias($this->class->rootEntityName);

        $columnList[] = $tableAlias . '.' . $discrColumn;

        // sub tables
        foreach ($this->class->subClasses as $subClassName) {
            $subClass   = $this->em->getClassMetadata($subClassName);
            $tableAlias = $this->getSQLTableAlias($subClassName);

            // Add subclass columns
            foreach ($subClass->fieldMappings as $fieldName => $mapping) {
                if (isset($mapping['inherited'])) {
                    continue;
                }

                $columnList[] = $this->getSelectColumnSQL($fieldName, $subClass);
            }

            // Add join columns (foreign keys)
            foreach ($subClass->associationMappings as $mapping) {
                if ( ! $mapping['isOwningSide']
                        || ! ($mapping['type'] & ClassMetadata::TO_ONE)
                        || isset($mapping['inherited'])) {
                    continue;
                }

                foreach ($mapping['targetToSourceKeyColumns'] as $srcColumn) {
                    $className = isset($mapping['inherited'])
                        ? $mapping['inherited']
                        : $subClass->name;

                    $targetClass = $this->em->getClassMetadata($mapping['targetEntity']);

                    $columnList[] = $this->getSelectJoinColumnSQL(
                        $tableAlias,
                        $srcColumn,
                        $className,
                        PersisterHelper::getTypeOfColumn(
                            $mapping['sourceToTargetKeyColumns'][$srcColumn],
                            $targetClass,
                            $this->em
                        )
                    );
                }
            }
        }

        $this->currentPersisterContext->selectColumnListSql = implode(', ', $columnList);

        return $this->currentPersisterContext->selectColumnListSql;
    }