PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
← All changes | backend/src/Entity/Notification/Notification.php +31 -8 1.0 → 1.5 View file →
@@ -7,9 +7,8 @@
7 7
8 8 namespace IvyForms\Entity\Notification;
9 9
10 10 use IvyForms\ValueObjects\Notification\Notification as NotificationValueObject;
11 -use IvyForms\Entity\Notification\NotificationContact;
12 11
13 12 /**
14 13 * Class Notification
15 14 *
@@ -27,8 +26,15 @@
27 26 */
28 27 private NotificationContact $contact;
29 28
30 29 /**
30 + * Opaque extension payload (Pro / add-ons). Not owned by Lite domain fields.
31 + *
32 + * @var array<string, mixed>
33 + */
34 + private array $extensionData = [];
35 +
36 + /**
31 37 * Notification constructor.
32 38 *
33 39 * @param NotificationValueObject $notification The notification object.
34 40 */
@@ -38,8 +44,24 @@
38 44 $this->contact = new NotificationContact($notification->contact);
39 45 }
40 46
41 47 /**
48 + * @param array<string, mixed> $data
49 + */
50 + public function setExtensionData(array $data): void
51 + {
52 + $this->extensionData = $data;
53 + }
54 +
55 + /**
56 + * @return array<string, mixed>
57 + */
58 + public function getExtensionData(): array
59 + {
60 + return $this->extensionData;
61 + }
62 +
63 + /**
42 64 * Get the notification ID.
43 65 *
44 66 * @return int
45 67 */
@@ -170,21 +192,21 @@
170 192
171 193 /**
172 194 * Get the smart logic status.
173 195 *
174 - * @return bool
196 + * @return array<string, mixed>
175 197 */
176 - public function isSmartLogic(): bool
198 + public function getSmartLogic(): array
177 199 {
178 - return $this->notification->isSmartLogic();
200 + return $this->notification->getSmartLogic();
179 201 }
180 202
181 203 /**
182 204 * Set the smart logic status.
183 205 *
184 - * @param bool $smartLogic
206 + * @param array<string, mixed> $smartLogic
185 207 */
186 - public function setSmartLogic(bool $smartLogic): void
208 + public function setSmartLogic(array $smartLogic): void
187 209 {
188 210 $this->notification->smartLogic = $smartLogic;
189 211 }
190 212
@@ -222,11 +244,12 @@
222 244 'enabled' => $this->isEnabled(),
223 245 'subject' => $this->getSubject(),
224 246 'message' => $this->getMessage(),
225 247 'showEmptyFields' => $this->isShowEmptyFields(),
226 - 'smartLogic' => $this->isSmartLogic(),
248 + 'smartLogic' => $this->getSmartLogic(),
227 249 'formId' => $this->getFormId(),
228 250 ],
229 - $this->getNotificationContact()->toArray()
251 + $this->getNotificationContact()->toArray(),
252 + $this->extensionData
230 253 );
231 254 }
232 255 }