Class yii\bootstrap\BaseHtml
Inheritance | yii\bootstrap\BaseHtml » yii\helpers\Html |
---|---|
Subclasses | yii\bootstrap\Html |
Available since version | 2.0.5 |
BaseHtml provides concrete implementation for yii\bootstrap\Html.
Do not use BaseHtml. Use yii\bootstrap\Html instead.
Public Methods
Method | Description | Defined By |
---|---|---|
activeStaticControl() | Generates a Bootstrap static form control for the given model attribute. | yii\bootstrap\BaseHtml |
checkboxList() | yii\bootstrap\BaseHtml | |
error() | yii\bootstrap\BaseHtml | |
icon() | Composes icon HTML for bootstrap Glyphicons. | yii\bootstrap\BaseHtml |
radioList() | yii\bootstrap\BaseHtml | |
staticControl() | Renders Bootstrap static form control. | yii\bootstrap\BaseHtml |
Method Details
Generates a Bootstrap static form control for the given model attribute.
See also staticControl().
public static string activeStaticControl ( $model, $attribute, $options = [] ) | ||
$model | \yii\base\Model | The model object. |
$attribute | string | The attribute name or expression. See \yii\bootstrap\getAttributeName() for the format about attribute expression. |
$options | array | The tag options in terms of name-value pairs. See staticControl() for details. |
return | string | Generated HTML |
---|
public static void checkboxList ( $name, $selection = null, $items = [], $options = [] ) | ||
$name | ||
$selection | ||
$items | ||
$options |
public static void error ( $model, $attribute, $options = [] ) | ||
$model | ||
$attribute | ||
$options |
Composes icon HTML for bootstrap Glyphicons.
public static string icon ( $name, $options = [] ) | ||
$name | string | Icon short name, for example: 'star' |
$options | array | 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:
|
return | string | Icon HTML. |
---|
public static void radioList ( $name, $selection = null, $items = [], $options = [] ) | ||
$name | ||
$selection | ||
$items | ||
$options |
Renders Bootstrap static form control.
By default value will be HTML-encoded using \yii\bootstrap\encode(), you may control this behavior via 'encode' option.
See also http://getbootstrap.com/css/#forms-controls-static.
public static string staticControl ( $value, $options = [] ) | ||
$value | string | Static control value. |
$options | array | 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:
|
return | string | Generated HTML |
---|