| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 18 | class ServerColumn extends DataColumn |
||
| 19 | { |
||
| 20 | public $idAttribute = 'server_id'; |
||
| 21 | public $attribute = 'server_id'; |
||
| 22 | public $nameAttribute = 'server'; |
||
| 23 | public $format = 'html'; |
||
| 24 | public $comboClass = ServerCombo::class; |
||
| 25 | |||
| 26 | public function init() |
||
| 27 | { |
||
| 28 | parent::init(); |
||
| 29 | if (!$this->filterInputOptions['id']) { |
||
| 30 | $this->filterInputOptions['id'] = $this->attribute; |
||
| 31 | } |
||
| 32 | if (!$this->filter && $this->grid->filterModel) { |
||
| 33 | $this->filter = Yii::createObject([ |
||
| 34 | 'class' => $this->comboClass, |
||
| 35 | 'attribute' => $this->attribute, |
||
| 36 | 'model' => $this->grid->filterModel, |
||
| 37 | 'formElementSelector' => 'td', |
||
| 38 | ])->run(); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getDataCellValue($model, $key, $index) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |