protected function generate_number($attributes)
{
$element = 'rtNumber';
if (is_array($attributes)) {
/* Starting the input tag */
$html = '<input type="number" ';
/* generating attributes */
$html .= $this->processAttributes($element, $attributes);
if (isset($attributes['min'])) {
$html .= " min='" . esc_attr($attributes['min']) . "' ";
}
if (isset($attributes['max'])) {
$html .= " max='" . esc_attr($attributes['max']) . "' ";
}
if (isset($attributes['step'])) {
$html .= " step='" . esc_attr($attributes['step']) . "' ";
}
/* ending the tag */
$html .= ' />';
if (isset($attributes['label'])) {
if (isset($attributes['labelClass'])) {
$html = $this->enclose_label($element, $html, $attributes['label'], $attributes['labelClass']);
} else {
$html = $this->enclose_label($element, $html, $attributes['label']);
}
}
if (isset($attributes['show_desc']) && $attributes['show_desc']) {
$html .= $this->generate_element_desc($attributes);
}
return $html;
} else {
throw new rtFormInvalidArgumentsException('attributes');
}
}