element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $value = $this->element['value'] ? (string) $this->element['value'] : '1'; $required = $this->required ? ' required="required" aria-required="true"' : ''; if (empty($this->value)) { $checked = (isset($this->element['checked'] )) ? ' checked="checked"' : ''; } else { $checked = ' checked="checked"'; } // Initialize JavaScript field attributes. $onclick = $this->element['onclick'] ? ' onclick="' . (string) $this->element['onclick'] . '"' : ''; return ''; } }