TbHtml::activeInlineRadioButtonListControlGroup PHP Method

activeInlineRadioButtonListControlGroup() public static method

Generates a control group with an inline radio button list for a model attribute.
See also: self::activeControlGroup
public static activeInlineRadioButtonListControlGroup ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$data array data for generating the list options (value=>display).
$htmlOptions array additional HTML attributes.
return string the generated control group.
    public static function activeInlineRadioButtonListControlGroup($model, $attribute, $data = array(), $htmlOptions = array())
    {
        return self::activeControlGroup(self::INPUT_TYPE_INLINERADIOBUTTONLIST, $model, $attribute, $htmlOptions, $data);
    }

Usage Example

Example #1
0
 public function testActiveInlineRadioButtonListControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeInlineRadioButtonListControlGroup(new Dummy(), 'radioList', array('Option 1', 'Option 2', 'Option 3'));
     $group = $I->createNode($html, 'div.control-group');
     $controls = $group->filter('div.controls');
     $I->seeNodeChildren($controls, array('input[type=hidden]', 'label.radio.inline', 'label.radio.inline', 'label.radio.inline'));
 }
All Usage Examples Of TbHtml::activeInlineRadioButtonListControlGroup
TbHtml