| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function init() |
||
| 26 | { |
||
| 27 | parent::init(); |
||
| 28 | |||
| 29 | if (!$this->combo instanceof Combo) { |
||
| 30 | $this->combo = ArrayHelper::merge([ |
||
| 31 | 'model' => $this->model, |
||
| 32 | 'attribute' => $this->attribute, |
||
| 33 | ], $this->combo); |
||
| 34 | |||
| 35 | $this->combo = Yii::createObject($this->combo); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->combo->registerClientConfig(); |
||
| 39 | |||
| 40 | $this->pluginOptions = ArrayHelper::merge([ |
||
| 41 | 'type' => 'combo', |
||
| 42 | 'placement' => 'bottom', |
||
| 43 | 'combo' => $this->combo->getPluginOptions(), |
||
| 44 | 'hash' => $this->combo->configId, |
||
| 45 | ], $this->pluginOptions); |
||
| 46 | |||
| 47 | $this->registerAssets(); |
||
| 48 | } |
||
| 49 | |||
| 56 |