You are here

function rules_data_selector_options_list in Rules 7.2

Returns the options list as specified by the selected property of the first parameter.

See also

rules_data_list_info_alter()

rules_action_data_set_info_alter()

rules_condition_data_is_info_alter()

Related topics

3 string references to 'rules_data_selector_options_list'
rules_action_data_set_info_alter in modules/data.eval.inc
Info alter callback for the data_set action.
rules_condition_data_is_info_alter in modules/data.eval.inc
Info alteration callback for the data_is condition.
rules_data_list_info_alter in modules/data.eval.inc
Info alteration callback for the "Add and Remove a list item" actions.

File

modules/data.rules.inc, line 738
General data related rules integration.

Code

function rules_data_selector_options_list(RulesAbstractPlugin $element) {
  $name = rules_array_key($element
    ->pluginParameterInfo());

  // If the selected data property has an option list, make use of it.
  if (isset($element->settings[$name . ':select']) && ($wrapper = $element
    ->applyDataSelector($element->settings[$name . ':select']))) {
    return $wrapper
      ->optionsList($element instanceof RulesActionInterface ? 'edit' : 'view');
  }
}