function RulesPlugin::returnVariables
Gets variables to return once the configuration has been executed.
2 calls to RulesPlugin::returnVariables()
- RulesAbstractPlugin::executeByArgs in includes/
rules.core.inc - Execute the configuration by passing arguments in a single array.
- RulesContainerPlugin::executeByArgs in includes/
rules.core.inc - Executes container with the given arguments.
2 methods override RulesPlugin::returnVariables()
- RulesCondition::returnVariables in includes/
rules.plugins.inc - Just return the boolean result.
- RulesConditionContainer::returnVariables in includes/
rules.core.inc - Just return the condition container's result.
File
-
includes/
rules.core.inc, line 703
Class
- RulesPlugin
- Base class for rules plugins.
Code
protected function returnVariables(RulesState $state, $result = NULL) {
$var_info = $this->providesVariables();
foreach ($var_info as $name => $info) {
try {
$vars[$name] = $this->getArgument($name, $info, $state);
} catch (RulesEvaluationException $e) {
// Ignore not existing variables.
$vars[$name] = NULL;
}
$var_info[$name] += array(
'allow null' => TRUE,
);
}
return isset($vars) ? array_values(rules_unwrap_data($vars, $var_info)) : array();
}