TbHtml::activeInlineRadioButtonList PHP Method

activeInlineRadioButtonList() public static method

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.
    public static function activeInlineRadioButtonList($model, $attribute, $data, $htmlOptions = array())
    {
        $htmlOptions['inline'] = true;
        return self::activeRadioButtonList($model, $attribute, $data, $htmlOptions);
    }

Usage Example

 /**
  * 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);
 }
All Usage Examples Of TbHtml::activeInlineRadioButtonList
TbHtml