Current Path : /data/web/virtuals/51568/virtual/www/subdom/pomucky/src/form/ |
Current File : /data/web/virtuals/51568/virtual/www/subdom/pomucky/src/form/TextareaField.php |
<?php namespace app\form; class TextareaField extends BaseField { public function renderInput(): string { return sprintf('<textarea name="%s" id="%s" class="form-control %s" %s>%s</textarea>', $this->attribute, $this->attribute, $this->model->hasError($this->attribute) ? 'is-invalid' : '', isset($this->model->disabled[$this->attribute]) && $this->model->disabled[$this->attribute] ? "disabled" : "", nl2br($this->model->{$this->attribute}) ); } }