You are here

public function ExecutionContextFactory::createContext in Zircon Profile 8

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

Creates a new execution context.

Parameters

ValidatorInterface $validator The validator:

mixed $root The root value of the validated: object graph

Return value

ExecutionContextInterface The new execution context

Overrides ExecutionContextFactoryInterface::createContext

File

vendor/symfony/validator/Context/ExecutionContextFactory.php, line 56

Class

ExecutionContextFactory
Creates new {@link ExecutionContext} instances.

Namespace

Symfony\Component\Validator\Context

Code

public function createContext(ValidatorInterface $validator, $root) {
  return new ExecutionContext($validator, $root, $this->translator, $this->translationDomain);
}