ImmutablePropertiesConstraint.php
Same filename and directory in other branches
Namespace
Drupal\Core\Entity\Plugin\Validation\ConstraintFile
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ ImmutablePropertiesConstraint.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Core\Entity\Plugin\Validation\Constraint;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;
/**
* Checks if config entity properties have been changed.
*/
class ImmutablePropertiesConstraint extends SymfonyConstraint {
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);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| ImmutablePropertiesConstraint | Checks if config entity properties have been changed. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.