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

1
2
3
4
5
6
7
8
9
public function createContext(ValidatorInterface $validator, $root)
 {
  return new ExecutionContext(
  $validator,
  $root,
  $this->translator,
  $this->translationDomain
  );
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.