/** * @inheritdoc */ public function init() { parent::init(); if (!isset($this->options['name'])) { $this->options['name'] = $this->hasModel() ? Html::getInputName($this->model, $this->attribute) : $this->name; } }
/** * @inheritdoc */ public function init() { parent::init(); $this->value = $this->model->{$this->attribute}; if (is_array($this->value)) { $this->multiple = true; } else { $this->value = $this->value ? [$this->value] : []; } $this->options['name'] = $this->hasModel() ? Html::getInputName($this->model, $this->attribute) : $this->name; $this->options['multiple'] = $this->multiple; $this->options['url'] = Url::to(['/file/manager/list']); }