You are here

public function ExecutionContext::getRoot in Zircon Profile 8.0

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

vendor/symfony/validator/ExecutionContext.php, line 151

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

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