function BundleConstraint::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\BundleConstraint::__construct()
File
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ BundleConstraint.php, line 22
Class
- BundleConstraint
- Checks if a value is a valid entity type.
Namespace
Drupal\Core\Entity\Plugin\Validation\ConstraintCode
public function __construct(public string|array $bundle, public $message = 'The entity must be of bundle %bundle.', ?array $groups = NULL, mixed $payload = NULL) {
parent::__construct(groups: $groups, payload: $payload);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.