namespace WPForms\Admin\Base\Tables\DataObjects;
* Column data object base class.
abstract class ColumnBase {
* @param int|string $id Column ID.
* @param array $settings Column settings.
public function __construct( $id, array $settings ) {
$this->label = $settings['label'] ?? '';
$this->label_html = empty( $settings['label_html'] ) ? $this->label : $settings['label_html'];
$this->is_draggable = $settings['draggable'] ?? true;
$this->type = empty( $settings['type'] ) ? $id : $settings['type'];
$this->readonly = $settings['readonly'] ?? false;
public function get_id() {
public function get_label(): string {
public function get_label_html(): string {
return $this->label_html;
public function get_type(): string {
public function is_draggable(): bool {
return $this->is_draggable;
public function is_readonly(): bool {