Esempio n. 1
0
 /**
  * Renders a static input
  *
  * @param array $options the tag options
  * @return $this
  */
 public function staticInput($options = [])
 {
     if (isset($options['value'])) {
         $content = $options['value'];
         unset($options['value']);
     } else {
         $content = Html::getAttributeValue($this->model, $this->attribute);
     }
     Html::addCssClass($options, 'form-control-static');
     $this->parts['{input}'] = Html::tag('p', $content, $options);
     $this->template = str_replace("\n{hint}", '', $this->template);
     $this->template = str_replace("\n{error}", '', $this->template);
     return $this;
 }