You are here

function rules_i18n_action_select_info_alter in Rules 7.2

Action "Select a translated value" info_alter callback.

File

rules_i18n/rules_i18n.rules.inc, line 102
Internationalization rules integration.

Code

function rules_i18n_action_select_info_alter(&$element_info, $element) {
  $element->settings += array(
    'data:select' => NULL,
  );
  if ($wrapper = $element
    ->applyDataSelector($element->settings['data:select'])) {
    $info = $wrapper
      ->info();

    // Pass through the data type of the selected data.
    $element_info['provides']['data_translated']['type'] = $wrapper
      ->type();
  }
}