function _commerce_update_rule_container_tokens in Commerce Core 7
Iterates over a container's children to recursively find non-container plugins whose parameters should be updated.
1 call to _commerce_update_rule_container_tokens()
- commerce_update_7100 in ./
commerce.install - Update Rules to use new prefixed parameter names and tokens.
File
- ./
commerce.install, line 63
Code
function _commerce_update_rule_container_tokens($rule, $events) {
foreach ($rule
->getIterator() as $child) {
if ($child instanceof RulesContainerPlugin) {
if ($rule instanceof RulesReactionRule) {
$events = $rule
->events();
}
_commerce_update_rule_container_tokens($child, $events);
}
else {
_commerce_update_rule_tokens($child, $events);
}
}
}