Generates an inline radio button list for a model attribute.
public static activeInlineRadioButtonList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string | ||
$model | CModel | the data model. |
$attribute | string | the attribute. |
$data | array | $data value-label pairs used to generate the radio button list. |
$htmlOptions | array | additional HTML attributes. |
return | string | the generated list. |
/** * Renders an inline radio button list for a model attribute * @param CModel $model the data model. * @param string $attribute the attribute. * @param array $data data for generating the list options (value=>display) * @param array $htmlOptions additional HTML attributes. * @return string the generated radio button list. * @see TbHtml::activeInlineRadioButtonList */ public function inlineRadioButtonList($model, $attribute, $data, $htmlOptions = array()) { return TbHtml::activeInlineRadioButtonList($model, $attribute, $data, $htmlOptions); }
public function testActiveInlineRadioButtonList() { $I = $this->codeGuy; $html = TbHtml::activeInlineRadioButtonList(new Dummy(), 'radioList', array('Option 1', 'Option 2', 'Option 3')); $container = $I->createNode($html); $I->seeNodeChildren($container, array('label.radio.inline', 'label.radio.inline', 'label.radio.inline')); }
/** * Renders an inlineRadioButtonList * Please check {@link TbHtml::activeInlineRadioButtonList} for detailed information * @param $model * @param $attribute * @param $data * @param array $htmlOptions * @return string */ public function inlineRadioButtonList($model, $attribute, $data, $htmlOptions = array()) { return $this->wrapControl(TbHtml::activeInlineRadioButtonList($model, $attribute, $data, $htmlOptions)); }