{$values['type']}($values, $extras); return $result; } protected function checkbox(&$values, &$extras) { unset($values['class'][0]); $values['value'] = (empty($values['value']) || $values['value'] == 'off') ? false : true; if (!empty($values['value']) && !in_array('checked', $extras)) { $extras[] = 'checked'; } if (in_array('readonly', $extras)) { $extras[] = 'disabled'; } $values['placeholder'] = (isset($values['placeholder'])) ? $values['placeholder'] : $values['label']; $result .= '