You are here

public function ExecutionContext::isConstraintValidated in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Context/ExecutionContext.php \Symfony\Component\Validator\Context\ExecutionContext::isConstraintValidated()
  2. 8 core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php \Drupal\Core\TypedData\Validation\ExecutionContext::isConstraintValidated()
Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php \Drupal\Core\TypedData\Validation\ExecutionContext::isConstraintValidated()

Returns whether a constraint was validated for an object.

@internal Used by the validator engine. Should not be called by user code.

Parameters

string $cacheKey The hash of the object:

string $constraintHash The hash of the constraint:

Return value

bool Whether the constraint was already validated

Overrides ExecutionContextInterface::isConstraintValidated

File

core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php, line 275
Contains \Drupal\Core\TypedData\Validation\ExecutionContext.

Class

ExecutionContext
Defines an execution context class.

Namespace

Drupal\Core\TypedData\Validation

Code

public function isConstraintValidated($cache_key, $constraint_hash) {
  return isset($this->validatedConstraints[$cache_key . ':' . $constraint_hash]);
}