public function ExecutionContext::isConstraintValidated

public ExecutionContext::isConstraintValidated($cache_key, $constraint_hash)

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 270

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]);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!Validation!ExecutionContext.php/function/ExecutionContext::isConstraintValidated/8.1.x