| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function run() |
||
| 36 | {
|
||
| 37 | $this->registerAssets(); |
||
| 38 | if ($this->hasModel()) {
|
||
| 39 | if ($this->form == null) {
|
||
| 40 | throw new InvalidConfigException(__CLASS__ . '.form property must be specified'); |
||
| 41 | } |
||
| 42 | if (empty($this->label)) |
||
| 43 | return $this->form->field($this->model, $this->attribute)->passwordInput($this->options); |
||
| 44 | return $this->form->field($this->model, $this->attribute)->passwordInput($this->options)->label($this->label); |
||
| 45 | } else {
|
||
| 46 | return Html::passwordInput($this->name, $this->value, $this->options); |
||
| 47 | } |
||
| 60 |