Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExecutionContext.php

function ExecutionContext::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/validator/Context/ExecutionContext.php \Symfony\Component\Validator\Context\ExecutionContext::__construct()

Creates a new ExecutionContext.

@internal Called by \Drupal\Core\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|null $translationDomain: (optional) The translation domain.

File

core/lib/Drupal/Core/Validation/ExecutionContext.php, line 85

Class

ExecutionContext
Defines an execution context class.

Namespace

Drupal\Core\Validation

Code

public function __construct(ValidatorInterface $validator, mixed $root, TranslatorInterface $translator, ?string $translationDomain = NULL) {
    $this->violations = new ConstraintViolationList();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal