. */ declare(strict_types=1); namespace App\Validator\Constraints; use Symfony\Component\Validator\Constraint; /** * Constraints the parent property on StructuralDBElement objects in the way, that neither the object self nor any * of its children can be assigned. */ #[\Attribute(\Attribute::TARGET_PROPERTY)] class NoneOfItsChildren extends Constraint { /** * @var string The message used if it is tried to assign an object as its own parent */ public string $self_message = 'validator.noneofitschild.self'; /** * @var string The message used if it is tried to use one of the children for as parent */ public string $children_message = 'validator.noneofitschild.children'; }