function ImmutablePropertiesConstraint::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ImmutablePropertiesConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\ImmutablePropertiesConstraint::__construct()

File

core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ImmutablePropertiesConstraint.php, line 21

Class

ImmutablePropertiesConstraint
Checks if config entity properties have been changed.

Namespace

Drupal\Core\Entity\Plugin\Validation\Constraint

Code

public function __construct(public array $properties, public string $message = "The '@name' property cannot be changed.", ?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.