You are here

public function RulesConditionalCaseUI::getValueOptionLabels in Conditional Rules 8

Same name and namespace in other branches
  1. 7 includes/rules_conditional.ui.inc \RulesConditionalCaseUI::getValueOptionLabels()
2 calls to RulesConditionalCaseUI::getValueOptionLabels()
RulesConditionalCaseUI::buildContent in includes/rules_conditional.ui.inc
RulesConditionalCaseUI::getParameterForm in includes/rules_conditional.ui.inc

File

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

Class

RulesConditionalCaseUI
UI for supporting option lists in the case value.

Code

public function getValueOptionLabels() {
  $parent = $this->element
    ->parentElement();
  if (isset($parent->settings['data:select'])) {
    $dataSelector = $parent->settings['data:select'];
    if ($wrapper = $this->element
      ->applyDataSelector($dataSelector)) {
      $dataInfo = $wrapper
        ->info();
      if (!empty($dataInfo['options list'])) {
        return $wrapper
          ->optionsList('view');
      }
    }
  }
}