TbHtml::radioButtonControlGroup PHP Method

radioButtonControlGroup() public static method

Generates a control group with a radio button.
See also: self::controlGroup
public static radioButtonControlGroup ( string $name, boolean | string $checked = false, array $htmlOptions = [] ) : string
$name string the input name.
$checked boolean | string whether the radio button is checked.
$htmlOptions array additional HTML attributes.
return string the generated control group.
    public static function radioButtonControlGroup($name, $checked = false, $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_RADIOBUTTON, $name, $checked, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testRadioButtonControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::radioButtonControlGroup('radio', false, array('label' => 'Label text'));
     $group = $I->createNode($html, 'div.control-group');
     $label = $group->filter('label.radio');
     $I->seeNodeChildren($label, array('input[type=radio]'));
 }
TbHtml