class RulesDataUIListInteger in Rules 7.2
UI for lists of integers.
Hierarchy
- class \RulesDataUI- class \RulesDataUIText implements RulesDataDirectInputFormInterface- class \RulesDataUIListText- class \RulesDataUIListInteger
 
 
- class \RulesDataUIListText
 
- class \RulesDataUIText implements RulesDataDirectInputFormInterface
Expanded class hierarchy of RulesDataUIListInteger
1 string reference to 'RulesDataUIListInteger'
- rules_rules_core_data_info in modules/rules_core.rules.inc 
- Implements hook_rules_data_info() on behalf of the pseudo rules_core module.
File
- ui/ui.data.inc, line 531 
- Contains data type related forms.
View source
class RulesDataUIListInteger extends RulesDataUIListText {
  /**
   * Implements RulesDataDirectInputFormInterface::inputForm().
   */
  public static function inputForm($name, $info, $settings, RulesPlugin $element) {
    $settings += array(
      $name => isset($info['default value']) ? $info['default value'] : NULL,
    );
    $form = parent::inputForm($name, $info, $settings, $element);
    if ($form[$name]['#type'] == 'textarea') {
      $form[$name]['#description'] = t('A list of integers, separated by commas. E.g. enter "1, 2, 3".');
      $form[$name]['#delimiter'] = ',';
      $form[$name]['#default_value'] = !empty($settings[$name]) ? implode(", ", $settings[$name]) : NULL;
      $form[$name]['#element_validate'][] = 'rules_ui_element_integer_list_validate';
      $form[$name]['#rows'] = 1;
    }
    return $form;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| RulesDataUI:: | public static | function | Returns the data type and parameter information for the given arguments. | |
| RulesDataUI:: | public static | function | Renders the value with a label if an options list is available. | |
| RulesDataUI:: | public static | function | Provides the selection form for a parameter. | |
| RulesDataUIListInteger:: | public static | function | Implements RulesDataDirectInputFormInterface::inputForm(). Overrides RulesDataUIListText:: | 2 | 
| RulesDataUIListText:: | public static | function | Overrides RulesDataUI::getDefaultMode(). Overrides RulesDataUIText:: | |
| RulesDataUIListText:: | public static | function | Implements RulesDataDirectInputFormInterface::render(). Overrides RulesDataUIText:: | 
