public function ExecutionContext::__construct
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\ValidationCode
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(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!Validation!ExecutionContext.php/function/ExecutionContext::__construct/8.1.x