function RulesDataUIInteger::inputForm

Implements RulesDataDirectInputFormInterface::inputForm().

Overrides RulesDataUIText::inputForm

File

ui/ui.data.inc, line 321

Class

RulesDataUIInteger
UI for integers.

Code

public static function inputForm($name, $info, $settings, RulesPlugin $element) {
    $form = parent::inputForm($name, $info, $settings, $element);
    if (empty($info['options list'])) {
        $form[$name]['#type'] = 'textfield';
    }
    $form[$name]['#element_validate'][] = 'rules_ui_element_integer_validate';
    return $form;
}