ExecutionContextFactory::createContext

public ExecutionContextFactory::createContext(ValidatorInterface $validator, $root)

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

core/lib/Drupal/Core/TypedData/Validation/ExecutionContextFactory.php, line 45

Class

ExecutionContextFactory
Defines an execution factory for the Typed Data validator.

Namespace

Drupal\Core\TypedData\Validation

Code

public function createContext(ValidatorInterface $validator, $root) 
 {
  return new ExecutionContext(
  $validator, 
  $root, 
  $this->translator, 
  $this->translationDomain
  );
}
doc_Drupal
2016-10-29 09:09:33
Comments
Leave a Comment

Please login to continue.