protected function LoopExpression::prepareExecutionMetadataStateBeforeTraversal in Rules 8.3
Prepares execution metadata state before traversing through children.
Overrides ExpressionContainerBase::prepareExecutionMetadataStateBeforeTraversal
See also
::prepareExecutionMetadataState()
::checkIntegrity()
File
- src/
Plugin/ RulesExpression/ LoopExpression.php, line 112
Class
- LoopExpression
- Holds a set of actions that are executed over the iteration of a list.
Namespace
Drupal\rules\Plugin\RulesExpressionCode
protected function prepareExecutionMetadataStateBeforeTraversal(ExecutionMetadataStateInterface $metadata_state) {
try {
$list_definition = $metadata_state
->fetchDefinitionByPropertyPath($this->configuration['list']);
$list_item_definition = $list_definition
->getItemDefinition();
$metadata_state
->setDataDefinition($this->configuration['list_item'], $list_item_definition);
} catch (IntegrityException $e) {
// Silently eat the exception: we just continue without adding the list
// item definition to the state.
}
}