helpers\BaseHtml activeLabel()

activeLabel() public static method

Generates a label tag for the given model attribute.

The label text is the label associated with the attribute, obtained via yii\base\Model::getAttributeLabel().

public static string activeLabel ( $model, $attribute, $options = [] )
$model yii\base\Model

The model object

$attribute string

The attribute name or expression. See getAttributeName() for the format about attribute expression.

$options array

The tag options in terms of name-value pairs. These will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using encode(). If a value is null, the corresponding attribute will not be rendered. The following options are specially handled:

See renderTagAttributes() for details on how attributes are being rendered.

return string

The generated label tag

doc_Yii
2016-10-30 17:04:53
Comments
Leave a Comment

Please login to continue.