-
packages/Webkul/DataGrid/src/Enums/ColumnTypeEnum.php
Open in GitHubenum ColumnTypeEnum: string { case STRING = 'string'; case INTEGER = 'integer'; case BOOLEAN = 'boolean'; case DROPDOWN = 'dropdown'; case DATE_RANGE = 'date_range'; case DATE_TIME_RANGE = 'datetime_range'; }
-
packages/Webkul/DataGrid/src/Column.php
Open in GitHubuse Webkul\DataGrid\Enums\ColumnTypeEnum; class Column { // ... public function init(): void { $this->setDatabaseColumnName(); switch ($this->type) { case ColumnTypeEnum::BOOLEAN->value: $this->setFormOptions($this->getBooleanOptions()); break; case ColumnTypeEnum::DROPDOWN->value: $this->setFormOptions($this->options); break; case ColumnTypeEnum::DATE_RANGE->value: $this->setFormInputType(FormInputTypeEnum::DATE->value); $this->setFormOptions($this->getRangeOptions()); break; case ColumnTypeEnum::DATE_TIME_RANGE->value: $this->setFormInputType(FormInputTypeEnum::DATE_TIME->value); $this->setFormOptions($this->getRangeOptions('Y-m-d H:i:s')); break; } } // ... }