element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; $attr .= $this->multiple ? ' multiple="multiple"' : ''; $attr .= $this->required ? ' required="required" aria-required="true"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; // Get the field options. $options = $this->getOptions(); return JHtml::_('access.level', $this->name, $this->value, $attr, $options, $this->id); } }