function RoleExistsConstraint::__construct

Same name and namespace in other branches
  1. 11.x core/modules/user/src/Plugin/Validation/Constraint/RoleExistsConstraint.php \Drupal\user\Plugin\Validation\Constraint\RoleExistsConstraint::__construct()

Attributes

#[HasNamedArguments]

File

core/modules/user/src/Plugin/Validation/Constraint/RoleExistsConstraint.php, line 21

Class

RoleExistsConstraint
Checks if a role exists.

Namespace

Drupal\user\Plugin\Validation\Constraint

Code

public function __construct(mixed $options = NULL, public $message = "The role with id '@rid' does not exist.", ?array $groups = NULL, mixed $payload = NULL) {
  parent::__construct($options, $groups, $payload);
}

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