public function ExpressionInterface::checkIntegrity in Rules 8.3
Verifies that this expression is configured correctly.
Example: All configured data selectors must be valid.
Note that for checking integrity the execution metadata state must be passed prepared as achieved by ::prepareExecutionMetadataState() and the expression must apply all metadata state preparations during its integrity check as it does in ::prepareExecutionMetadataState(). This allows for efficient integrity checks of expression trees; e.g. see \Drupal\rules\Engine\ActionExpressionContainer::checkIntegrity().
Parameters
\Drupal\rules\Context\ExecutionMetadataStateInterface $metadata_state: The execution metadata state, prepared until right before this expression.
bool $apply_assertions: (optional) Whether to apply metadata assertions while preparing the execution metadata state. Defaults to TRUE.
Return value
\Drupal\rules\Engine\IntegrityViolationList A list object containing \Drupal\rules\Engine\IntegrityViolation objects.
See also
::prepareExecutionMetadataState()
4 methods override ExpressionInterface::checkIntegrity()
- ActionExpression::checkIntegrity in src/
Plugin/ RulesExpression/ ActionExpression.php - Verifies that this expression is configured correctly.
- ConditionExpression::checkIntegrity in src/
Plugin/ RulesExpression/ ConditionExpression.php - Verifies that this expression is configured correctly.
- ExpressionContainerBase::checkIntegrity in src/
Engine/ ExpressionContainerBase.php - Verifies that this expression is configured correctly.
- RuleExpression::checkIntegrity in src/
Plugin/ RulesExpression/ RuleExpression.php - Verifies that this expression is configured correctly.
File
- src/
Engine/ ExpressionInterface.php, line 131
Class
- ExpressionInterface
- Defines the interface for Rules expressions.
Namespace
Drupal\rules\EngineCode
public function checkIntegrity(ExecutionMetadataStateInterface $metadata_state, $apply_assertions = TRUE);