Author: Alexander Kochetov (creocoder@gmail.com)
Inheritance: extends yii\widgets\InputWidget
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->fieldOptions['multiple'] = true;
     $this->fieldOptions['id'] = ArrayHelper::getValue($this->options, 'id');
     $this->options['id'] .= '-fileupload';
     $this->options['data-upload-template-id'] = $this->uploadTemplateId ?: 'template-upload';
     $this->options['data-download-template-id'] = $this->downloadTemplateId ?: 'template-download';
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->fieldOptions['multiple'] = true;
     $this->fieldOptions['id'] = ArrayHelper::getValue($this->options, 'id');
     $this->options['id'] .= '-form';
     $this->options['enctype'] = 'multipart/form-data';
     $this->options['uploadTemplateId'] = $this->uploadTemplateId ?: '#template-upload';
     $this->options['downloadTemplateId'] = $this->downloadTemplateId ?: '#template-download';
 }
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $url = Url::to($this->url);
     $this->options['data-url'] = $url;
 }