You are here

public function LegacyExecutionContextFactory::createContext in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Context/LegacyExecutionContextFactory.php \Symfony\Component\Validator\Context\LegacyExecutionContextFactory::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/LegacyExecutionContextFactory.php, line 67

Class

LegacyExecutionContextFactory
Creates new {@link LegacyExecutionContext} instances.

Namespace

Symfony\Component\Validator\Context

Code

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