You are here

protected function RulesConditionalCaseUI::getParameterForm in Conditional Rules 8

Same name and namespace in other branches
  1. 7 includes/rules_conditional.ui.inc \RulesConditionalCaseUI::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;
}