PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
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/Field/Field.php +33 -0 1.0 → 1.5.1 View file →
@@ -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 */
@@ -233,8 +241,28 @@
233 241 $this->formField->parentId = $parentId;
234 242 }
235 243
236 244 /**
245 + * Get the page ID for multi-page forms.
246 + *
247 + * @return string|null The page ID.
248 + */
249 + public function getPageId(): ?string
250 + {
251 + return $this->formField->pageId;
252 + }
253 +
254 + /**
255 + * Set the page ID for multi-page forms.
256 + *
257 + * @param string|null $pageId The page ID to set.
258 + */
259 + public function setPageId(?string $pageId): void
260 + {
261 + $this->formField->pageId = $pageId;
262 + }
263 +
264 + /**
237 265 * Set the number of rows (for textarea fields).
238 266 *
239 267 * @param int $rows
240 268 */
@@ -323,13 +351,18 @@
323 351 'rowIndex' => $this->getRowIndex(),
324 352 'columnIndex' => $this->getColumnIndex(),
325 353 'width' => $this->getWidth(),
326 354 'parentId' => $this->getParentId(),
355 + 'pageId' => $this->getPageId(),
327 356 'rows' => $this->formField->getRows()
328 357 ],
329 358 $this->getFieldGeneralSettings()->toArray(),
330 359 $this->getFieldAdvancedSettings()->toArray()
331 360 );
361 +
362 + foreach ($this->additionalProperties as $property) {
363 + $data = array_merge($data, $property);
364 + }
332 365
333 366 /**
334 367 * Allows modification of the array representation of the Field entity.
335 368 * @since 0.1.0