class LangcodeRequiredIfTranslatableValuesConstraint

Same name in other branches
  1. 10 core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/LangcodeRequiredIfTranslatableValuesConstraint.php \Drupal\Core\Config\Plugin\Validation\Constraint\LangcodeRequiredIfTranslatableValuesConstraint

Hierarchy

Expanded class hierarchy of LangcodeRequiredIfTranslatableValuesConstraint

File

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

Namespace

Drupal\Core\Config\Plugin\Validation\Constraint
View source
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.";

}

Members

Title Sort descending Modifiers Object type Summary
LangcodeRequiredIfTranslatableValuesConstraint::$missingMessage public property The error message if this config object is missing a `langcode`.
LangcodeRequiredIfTranslatableValuesConstraint::$superfluousMessage public property The error message if this config object contains a superfluous `langcode`.

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