/** * Renders a list of radio buttons. * A radio button list is like a checkbox list, except that it only allows single selection. * The selection of the radio buttons is taken from the value of the model attribute. * @param array $items the data item used to generate the radio buttons. * The array values are the labels, while the array keys are the corresponding radio values. * @param array $options options (name => config) for the radio button list. * For the list of available options please refer to the `$options` parameter of [[\yii\helpers\Html::activeRadioList()]]. * @return $this the field object itself */ public function radioList($items, $options = []) { $this->adjustLabelFor($options); $this->parts['{input}'] = Html::activeRadioList($this->model, $this->attribute, $items, $options); return $this; }