TbHtml::createCheckBoxAndRadioButtonLabel PHP Method

createCheckBoxAndRadioButtonLabel() protected static method

Generates a label for a checkbox or radio input by wrapping the input.
protected static createCheckBoxAndRadioButtonLabel ( string $label, string $input, array $htmlOptions ) : string
$label string the label text.
$input string the input.
$htmlOptions array additional HTML attributes.
return string the generated label.
    protected static function createCheckBoxAndRadioButtonLabel($label, $input, $htmlOptions)
    {
        list($hidden, $input) = self::normalizeCheckBoxAndRadio($input);
        return $hidden . ($label !== false ? self::tag('label', $htmlOptions, $input . ' ' . $label) : $input);
    }
TbHtml