function LangcodeRequiredIfTranslatableValuesConstraint::__construct

Attributes

#[HasNamedArguments]

File

core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/LangcodeRequiredIfTranslatableValuesConstraint.php, line 22

Class

LangcodeRequiredIfTranslatableValuesConstraint
Validation constraint for translatable configuration.

Namespace

Drupal\Core\Config\Plugin\Validation\Constraint

Code

public function __construct(mixed $options = NULL, public string $missingMessage = "The @name config object must specify a language code, because it contains translatable values.", public string $superfluousMessage = "The @name config object does not contain any translatable values, so it should not specify a language code.", ?array $groups = NULL, mixed $payload = NULL) {
  parent::__construct($options, $groups, $payload);
}

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