You are here

function rules_action_data_set_info_alter in Rules 7.2

Info alter callback for the data_set action.

Related topics

File

modules/data.eval.inc, line 42
Contains rules integration for the data module needed during evaluation.

Code

function rules_action_data_set_info_alter(&$element_info, $element) {
  $element->settings += array(
    'data:select' => NULL,
  );
  if ($wrapper = $element
    ->applyDataSelector($element->settings['data:select'])) {
    $info = $wrapper
      ->info();
    $element_info['parameter']['value']['type'] = $wrapper
      ->type();
    $element_info['parameter']['value']['options list'] = !empty($info['options list']) ? 'rules_data_selector_options_list' : FALSE;
  }
}