コード例 #1
0
 public function init()
 {
     parent::init();
     if ($this->model && $this->attribute) {
         $this->options['name'] = Html::getInputName($this->model, $this->attribute);
         $this->options[$this->modelAttribute] = Html::getInputNgModel($this->model, $this->attribute);
     }
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public static function activeTextarea($model, $attribute, $options = [])
 {
     if (!isset($options['ng-model'])) {
         $options['ng-model'] = static::getInputNgModel($model, $attribute);
     }
     // Set additional parameters required by angular validators
     $validators = $model->getActiveValidators($attribute);
     static::addAngularValidators($options, $validators);
     $name = Html::getInputName($model, $attribute);
     return static::textarea($name, null, $options);
 }