extends |
Column |
|---|
If field have values without a relation like a status or a coded state of a process, example: Machine state: 0 => off 1 => powerup 2 => on 3 => resetting 4 => error.
we don't need a table to define this, cause are defined in project
using KeyValue Column you can show this values without using DB Relations need to be defined in field like this:
$this->addField('course_payment_status', [ 'caption' => __('Payment Status'), 'default' => 0, 'values' => [ __('not invoiceable'), __('ready to invoice'), __('invoiced'), __('paid'), ], 'ui' => [ 'form' => [Form\Control\Dropdown::class], 'table' => ['KeyValue'], ], ]);
| Methods | ||
|---|---|---|
public
|
getHtmlTags(Model $row, ?Field $field): array
|
# |
| Methods used from Atk4\Core\AppScopeTrait |
|---|
assertInstanceOfApp(), issetApp(), getApp(), setApp() |
| Methods used from Atk4\Core\DiContainerTrait |
|---|
setDefaults(), setMissingProperty(), assertInstanceOf(), _fromSeedPrecheck(), fromSeed(), fromSeedUnsafe() |
| Methods used from Atk4\Core\InitializerTrait |
|---|
init(), isInitialized(), assertIsInitialized(), invokeInit() |
| Methods used from Atk4\Core\TrackableTrait |
|---|
issetOwner(), setOwner(), unsetOwner(), getDesiredName(), destroy() |
| Constants inherited from Atk4\Ui\Table\Column |
|---|
|
| Properties | |||
|---|---|---|---|
public
|
array
|
$values
|
# |
| Properties inherited from Atk4\Ui\Table\Column |
|---|
$table, $attr, $caption, $sortable, $columnData, $hasHeaderAction, $headerActionTag |
| Properties used from Atk4\Core\AppScopeTrait |
|---|
$_app, $maxNameLength, $uniqueNameHashes |
| Properties used from Atk4\Core\InitializerTrait |
|---|
$_initialized |
| Properties used from Atk4\Core\NameTrait |
|---|
$name |
| Properties used from Atk4\Core\TrackableTrait |
|---|
$_owner, $shortName |