| @@ -53,8 +53,16 @@ | ||
| 53 | 53 | $this->additionalProperties = apply_filters('ivyforms/field/entity/init_additional_properties', [], $this); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | + * Underlying field value object (used by Pro extension hooks). | |
| 58 | + */ | |
| 59 | + public function getFormField(): FieldValueObject | |
| 60 | + { | |
| 61 | + return $this->formField; | |
| 62 | + } | |
| 63 | + | |
| 64 | + /** | |
| 57 | 65 | * Get the ID of the form to which this field belongs |
| 58 | 66 | * |
| 59 | 67 | * @return int The form ID. |
| 60 | 68 | */ |
| @@ -349,8 +357,12 @@ | ||
| 349 | 357 | ], |
| 350 | 358 | $this->getFieldGeneralSettings()->toArray(), |
| 351 | 359 | $this->getFieldAdvancedSettings()->toArray() |
| 352 | 360 | ); |
| 361 | + | |
| 362 | + foreach ($this->additionalProperties as $property) { | |
| 363 | + $data = array_merge($data, $property); | |
| 364 | + } | |
| 353 | 365 | |
| 354 | 366 | /** |
| 355 | 367 | * Allows modification of the array representation of the Field entity. |
| 356 | 368 | * @since 0.1.0 |