public ExecutionContext::__construct(ValidatorInterface $validator, $root, TranslatorInterface $translator, $translationDomain = NULL)
Creates a new ExecutionContext.
@internal Called by \Drupal\Core\TypedData\Validation\ExecutionContextFactory. Should not be used in user code.
Parameters
\Symfony\Component\Validator\Validator\ValidatorInterface $validator: The validator.
mixed $root: The root.
\Drupal\Core\Validation\TranslatorInterface $translator: The translator.
string $translationDomain: (optional) The translation domain.
File
- core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php, line 123
Class
- ExecutionContext
- Defines an execution context class.
Namespace
Drupal\Core\TypedData\Validation
Code
public function __construct(ValidatorInterface $validator, $root, TranslatorInterface $translator, $translationDomain = NULL) { $this->validator = $validator; $this->root = $root; $this->translator = $translator; $this->translationDomain = $translationDomain; $this->violations = new ConstraintViolationList(); }
Please login to continue.