You are here

protected function RulesConditionalCaseUI::getParameterForm in Conditional Rules 7

Same name and namespace in other branches
  1. 8 includes/rules_conditional.ui.inc \RulesConditionalCaseUI::getParameterForm()

Actually generates the parameter form for the given data type.

Overrides RulesPluginUI::getParameterForm

File

includes/rules_conditional.ui.inc, line 153
Plugin UI implementation.

Class

RulesConditionalCaseUI
UI for supporting option lists in the case value.

Code

protected function getParameterForm($name, $info, $settings, &$mode) {
  $form = parent::getParameterForm($name, $info, $settings, $mode);
  if ($name == 'value' && $mode == 'input') {
    $labels = $this
      ->getValueOptionLabels();
    if (isset($labels)) {
      $form['settings']['value']['#type'] = 'select';
      $form['settings']['value']['#options'] = $labels;
      $form['settings']['value']['#empty_value'] = '';
    }
  }
  return $form;
}