function RulesDataUIListToken::inputForm

Implements RulesDataDirectInputFormInterface::inputForm().

Overrides RulesDataUIListInteger::inputForm

File

ui/ui.data.inc, line 560

Class

RulesDataUIListToken
UI for lists of tokens.

Code

public static function inputForm($name, $info, $settings, RulesPlugin $element) {
    $form = parent::inputForm($name, $info, $settings, $element);
    if ($form[$name]['#type'] == 'textarea') {
        $form[$name]['#description'] = t('A list of text tokens, separated by commas. E.g. enter "one, two, three".');
        $form[$name]['#element_validate'] = array(
            'rules_ui_element_token_list_validate',
        );
    }
    return $form;
}