You are here

public function ExecutionContext::__construct in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/ExecutionContext.php \Symfony\Component\Validator\ExecutionContext::__construct()
  2. 8 vendor/symfony/validator/Context/ExecutionContext.php \Symfony\Component\Validator\Context\ExecutionContext::__construct()
  3. 8 core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php \Drupal\Core\TypedData\Validation\ExecutionContext::__construct()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/ExecutionContext.php \Symfony\Component\Validator\ExecutionContext::__construct()

Creates a new execution context.

Parameters

GlobalExecutionContextInterface $globalContext The global context storing node-independent state.:

TranslatorInterface $translator The translator for translating violation messages.:

null|string $translationDomain The domain of the validation messages.:

MetadataInterface $metadata The metadata of the validated node.:

mixed $value The value of the validated node.:

string $group The current validation group.:

string $propertyPath The property path to the current node.:

File

vendor/symfony/validator/ExecutionContext.php, line 77

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

public function __construct(GlobalExecutionContextInterface $globalContext, TranslatorInterface $translator, $translationDomain = null, MetadataInterface $metadata = null, $value = null, $group = null, $propertyPath = '') {
  if (null === $group) {
    $group = Constraint::DEFAULT_GROUP;
  }
  $this->globalContext = $globalContext;
  $this->translator = $translator;
  $this->translationDomain = $translationDomain;
  $this->metadata = $metadata;
  $this->value = $value;
  $this->propertyPath = $propertyPath;
  $this->group = $group;
}