*/ #[ORM\Column(type: Types::JSON)] #[Assert\All([ new Assert\Email(message: '"{{ value }}" ist keine gültige E-Mail-Adresse.'), new Assert\Length(max: 180), ])] private array $notificationRecipients = []; public function __construct(ResourceType $type) { $this->type = $type; } public function getId(): ?int { return $this->id; } public function getType(): ResourceType { return $this->type; } /** * @return list */ public function getNotificationRecipients(): array { return $this->notificationRecipients; } /** * @param list $recipients */ public function setNotificationRecipients(array $recipients): void { $this->notificationRecipients = array_values($recipients); } public function hasNotificationRecipients(): bool { return [] !== $this->notificationRecipients; } }