class ExtensionExistsConstraint
Same name in other branches
- 11.x core/lib/Drupal/Core/Extension/Plugin/Validation/Constraint/ExtensionExistsConstraint.php \Drupal\Core\Extension\Plugin\Validation\Constraint\ExtensionExistsConstraint
Checks that the value is the name of an installed extension.
Hierarchy
- class \Drupal\Core\Extension\Plugin\Validation\Constraint\ExtensionExistsConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of ExtensionExistsConstraint
File
-
core/
lib/ Drupal/ Core/ Extension/ Plugin/ Validation/ Constraint/ ExtensionExistsConstraint.php, line 14
Namespace
Drupal\Core\Extension\Plugin\Validation\ConstraintView source
class ExtensionExistsConstraint extends SymfonyConstraint {
/**
* The error message for a non-existent module.
*
* @var string
*/
public string $moduleMessage = "Module '@name' is not installed.";
/**
* The error message for a non-existent theme.
*
* @var string
*/
public string $themeMessage = "Theme '@name' is not installed.";
/**
* The type of extension to look for. Can be 'module' or 'theme'.
*
* @var string
*/
public string $type;
/**
* {@inheritdoc}
*/
public function getRequiredOptions() {
return [
'type',
];
}
/**
* {@inheritdoc}
*/
public function getDefaultOption() {
return 'type';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ExtensionExistsConstraint::$moduleMessage | public | property | The error message for a non-existent module. |
ExtensionExistsConstraint::$themeMessage | public | property | The error message for a non-existent theme. |
ExtensionExistsConstraint::$type | public | property | The type of extension to look for. Can be 'module' or 'theme'. |
ExtensionExistsConstraint::getDefaultOption | public | function | |
ExtensionExistsConstraint::getRequiredOptions | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.