widgets\ActiveField label()

label() public method

Generates a label tag for $attribute.

public $this label ( $label = null, $options = [] )
$label null|string|false

The label to use. If null, the label will be generated via yii\base\Model::getAttributeLabel(). If false, the generated field will not contain the label part. Note that this will NOT be encoded.

$options null|array

The tag options in terms of name-value pairs. It will be merged with $labelOptions. The options will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using yii\helpers\Html::encode(). If a value is null, the corresponding attribute will not be rendered.

return $this

The field object itself.

doc_Yii
2016-10-30 17:17:52
Comments
Leave a Comment

Please login to continue.