protected function RulesListConditionsConditionalLoop::setListVar in Rules List Conditions 7
Internal helper for child loops to set current item in loop body.
Return value
RulesState A copy of the rules execution context with the loop variable for the current item in the list being iterated over.
2 calls to RulesListConditionsConditionalLoop::setListVar()
- RulesListConditionsAll::evaluate in includes/
rules_list_conditions.plugins.inc - Evaluate the element on a given rules evaluation state.
- RulesListConditionsAny::evaluate in includes/
rules_list_conditions.plugins.inc - Evaluate the element on a given rules evaluation state.
File
- includes/
rules_list_conditions.core.inc, line 138 - Contains the base class for condition loops.
Class
- RulesListConditionsConditionalLoop
- Base class for condition loops.
Code
protected function setListVar($state, $item) {
$local = clone $state;
$info = $this
->listItemInfo();
$name = $this->settings['item:var'];
$local
->addVariable($name, $item, $info);
return $local;
}