class ConfigExistsConstraint

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

Checks that the value is the name of an existing config object.

Hierarchy

  • class \Drupal\Core\Config\Plugin\Validation\Constraint\ConfigExistsConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of ConfigExistsConstraint

File

core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/ConfigExistsConstraint.php, line 14

Namespace

Drupal\Core\Config\Plugin\Validation\Constraint
View source
class ConfigExistsConstraint extends SymfonyConstraint {
    
    /**
     * The error message.
     *
     * @var string
     */
    public string $message = "The '@name' config does not exist.";
    
    /**
     * Optional prefix, to be specified when this contains a config entity ID.
     *
     * Every config entity type can have multiple instances, all with unique IDs
     * but the same config prefix. When config refers to a config entity,
     * typically only the ID is stored, not the prefix.
     *
     * @var string
     */
    public string $prefix = '';

}

Members

Title Sort descending Modifiers Object type Summary
ConfigExistsConstraint::$message public property The error message.
ConfigExistsConstraint::$prefix public property Optional prefix, to be specified when this contains a config entity ID.

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