function hook_rules_action_base_upgrade

D6 to D7 upgrade process hook for mapping action or condition configuration.

During upgrading Drupal 6 rule configurations to Drupal 7 Rules is taking care of upgrading the configuration of all known parameters, which only works if the parameter name has not changed. If something changed, this callback can be used to properly apply the configuration of the Drupal 6 action ($element) to the Drupal 7 version ($target).

This is no real hook, but a callback that is invoked for each Drupal 6 action or condition that is to be upgraded to Drupal 7. E.g. the function name called for the action "rules_action_set_node_title" would be "rules_action_set_node_title_upgrade".

Parameters

$element: The element array of a configured condition or action which is to be upgraded.

$target: The Drupal 7 version of the configured element.

See also

hook_rules_element_upgrade_alter()

Related topics

File

./rules.api.php, line 1019

Code

function hook_rules_action_base_upgrade($element, RulesPlugin $target) {
    $target->settings['data:select'] = $element['#settings']['#argument map']['node'] . ':title';
    $target->settings['value'] = $element['#settings']['title'];
}