LangcodeRequiredIfTranslatableValuesConstraint.php
Same filename in other branches
Namespace
Drupal\Core\Config\Plugin\Validation\ConstraintFile
-
core/
lib/ Drupal/ Core/ Config/ Plugin/ Validation/ Constraint/ LangcodeRequiredIfTranslatableValuesConstraint.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Core\Config\Plugin\Validation\Constraint;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;
class LangcodeRequiredIfTranslatableValuesConstraint extends SymfonyConstraint {
/**
* The error message if this config object is missing a `langcode`.
*
* @var string
*/
public string $missingMessage = "The @name config object must specify a language code, because it contains translatable values.";
/**
* The error message if this config object contains a superfluous `langcode`.
*
* @var string
*/
public string $superfluousMessage = "The @name config object does not contain any translatable values, so it should not specify a language code.";
}
Classes
Title | Deprecated | Summary |
---|---|---|
LangcodeRequiredIfTranslatableValuesConstraint |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.