function ExecutionContextFactory::createContext

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Validation/ExecutionContextFactory.php \Drupal\Core\TypedData\Validation\ExecutionContextFactory::createContext()
  2. 8.9.x core/lib/Drupal/Core/TypedData/Validation/ExecutionContextFactory.php \Drupal\Core\TypedData\Validation\ExecutionContextFactory::createContext()
  3. 10 core/lib/Drupal/Core/Validation/ExecutionContextFactory.php \Drupal\Core\Validation\ExecutionContextFactory::createContext()

File

core/lib/Drupal/Core/Validation/ExecutionContextFactory.php, line 33

Class

ExecutionContextFactory
Defines an execution factory for the Symfony validator.

Namespace

Drupal\Core\Validation

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.