helpers/TbHtml.php
public static function activeCheckBox($model, $attribute, $htmlOptions = array())
    {
        $label = TbArray::popValue('label', $htmlOptions, false);
        $labelOptions = TbArray::popValue('labelOptions', $htmlOptions, array());
        $input = parent::activeCheckBox($model, $attribute, $htmlOptions);
        if (TbArray::popValue('useContainer', $htmlOptions, false)) {
            return self::tag(
                'div',
                array('class' => 'checkbox'),
                self::createCheckBoxAndRadioButtonLabel($label, $input, $labelOptions)
            );
        } else {
            return self::createCheckBoxAndRadioButtonLabel($label, $input, $labelOptions);
        }
    }
public static function activeCheckBox($model, $attribute, $htmlOptions = array())
    {
        $label = TbArray::popValue('label', $htmlOptions, false);
        $labelOptions = TbArray::popValue('labelOptions', $htmlOptions, array());
        $input = parent::activeCheckBox($model, $attribute, $htmlOptions);
        if (TbArray::popValue('useContainer', $htmlOptions, false)) {
            return self::tag(
                'div',
                array('class' => 'checkbox'),
                self::createCheckBoxAndRadioButtonLabel($label, $input, $labelOptions)
            );
        } else {
            return self::createCheckBoxAndRadioButtonLabel($label, $input, $labelOptions);
        }
    }
public static function activeCheckBox ( $ model , $ attribute , $ htmlOptions = array ( ) ) { $ label = TbArray :: popValue ( 'label' , $ htmlOptions , false ) ; $ labelOptions = TbArray :: popValue ( 'labelOptions' , $ htmlOptions , array ( ) ) ; $ input = parent :: activeCheckBox ( $ model , $ attribute , $ htmlOptions ) ; if ( TbArray :: popValue ( 'useContainer' , $ htmlOptions , false ) ) { return self :: tag ( 'div' , array ( 'class' => 'checkbox' ) , self :: createCheckBoxAndRadioButtonLabel ( $ label , $ input , $ labelOptions ) ) ; } else { return self :: createCheckBoxAndRadioButtonLabel ( $ label , $ input , $ labelOptions ) ; } }
Generates a check box for a model attribute.
@param CModel $model the data model.
@param string $attribute the attribute.
@param array $htmlOptions additional HTML attributes.
@return string the generated check box.
Generates a check box for a model attribute .