コード例 #1
0
ファイル: Rating.php プロジェクト: vetoni/toko
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if (!isset($this->options['name'])) {
         $this->options['name'] = $this->hasModel() ? Html::getInputName($this->model, $this->attribute) : $this->name;
     }
 }
コード例 #2
0
ファイル: ImageSelector.php プロジェクト: vetoni/toko
 /**
  * @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']);
 }