/** * Get option attributes * * @param mixed $value Value * @param mixed $text Text * * @return array */ protected function getOptionAttributes($value, $text) { $attributes = parent::getOptionAttributes($value, $text); if ($this->isOptionSelected($value)) { $attributes['checked'] = 'checked'; } if (isset($attributes['selected'])) { unset($attributes['selected']); } $attributes['type'] = 'radio'; $attributes['name'] = $this->getName(); return $attributes; }