function ExtensionNameConstraint::__construct
Same name in other branches
- 11.x core/lib/Drupal/Core/Extension/Plugin/Validation/Constraint/ExtensionNameConstraint.php \Drupal\Core\Extension\Plugin\Validation\Constraint\ExtensionNameConstraint::__construct()
Constructs an ExtensionNameConstraint object.
Parameters
string|array|null $pattern: The regular expression to test for.
mixed ...$arguments: Arguments to pass to the parent constructor.
File
-
core/
lib/ Drupal/ Core/ Extension/ Plugin/ Validation/ Constraint/ ExtensionNameConstraint.php, line 29
Class
- ExtensionNameConstraint
- Checks that the value is a valid extension name.
Namespace
Drupal\Core\Extension\Plugin\Validation\ConstraintCode
public function __construct(string|array|null $pattern, ...$arguments) {
// Always use the regular expression that ExtensionDiscovery uses to find
// valid extensions.
$pattern = ExtensionDiscovery::PHP_FUNCTION_PATTERN;
parent::__construct($pattern, ...$arguments);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.