You are here

public function ExecutionContext::getRoot in Zircon Profile 8

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

Returns the value at which validation was started in the object graph.

The validator, when given an object, traverses the properties and related objects and their properties. The root of the validation is the object from which the traversal started.

The current value is returned by {@link getValue}.

Return value

mixed The root value of the validation.

Overrides ExecutionContextInterface::getRoot

File

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

Class

ExecutionContext
Defines an execution context class.

Namespace

Drupal\Core\TypedData\Validation

Code

public function getRoot() {
  return $this->root;
}