コード例 #1
0
 /**
  * Renders Bootstrap static form control.
  * @param array $options the tag options in terms of name-value pairs. These will be rendered as
  * the attributes of the resulting tag. There are also a special options:
  *
  * - encode: boolean, whether value should be HTML-encoded or not.
  *
  * @return $this the field object itself
  * @since 2.0.5
  * @see http://getbootstrap.com/css/#forms-controls-static
  */
 public function staticControl($options = [])
 {
     $this->adjustLabelFor($options);
     $this->parts['{input}'] = Html::activeStaticControl($this->model, $this->attribute, $options);
     return $this;
 }