Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class EnumColumn extends DataColumn |
||
8 | { |
||
9 | /** |
||
10 | * @var array List of value => name pairs |
||
11 | */ |
||
12 | public $enum = []; |
||
13 | |||
14 | /** |
||
15 | * @var bool |
||
16 | */ |
||
17 | public $loadFilterDefaultValues = true; |
||
18 | |||
19 | /** |
||
20 | * @inheritdoc |
||
21 | */ |
||
22 | public function init() |
||
23 | { |
||
24 | if ($this->loadFilterDefaultValues && $this->filter === null) { |
||
25 | $this->filter = $this->enum; |
||
26 | } |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | public function getDataCellValue($model, $key, $index) |
||
36 | } |
||
37 | } |
||
38 |