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/ValueObjects/Field/Field.php +8 -8 0.9 → 1.5.1 View file →
@@ -6,13 +6,8 @@
6 6 */
7 7
8 8 namespace IvyForms\ValueObjects\Field;
9 9
10 -// phpcs:disable PSR1.Files.SideEffects
11 -if (!defined('ABSPATH')) {
12 - exit; // Exit if accessed directly
13 -}
14 -
15 10 use IvyForms\Common\Exceptions\ValidationException;
16 11 use IvyForms\Services\Translations\BackendStrings;
17 12
18 13 /**
@@ -59,8 +54,12 @@
59 54 * @var int|null
60 55 */
61 56 public ?int $parentId;
62 57 /**
58 + * @var string|null Page ID for multi-page forms
59 + */
60 + public ?string $pageId;
61 + /**
63 62 * @var FieldGeneralSettings
64 63 */
65 64 public FieldGeneralSettings $generalSettings;
66 65 /**
@@ -104,8 +103,9 @@
104 103 * @param int $rows
105 104 * @param int $rowIndex
106 105 * @param int $columnIndex
107 106 * @param int $width
107 + * @param string|null $pageId
108 108 *
109 109 * @throws ValidationException
110 110 */
111 111 public function __construct(
@@ -120,9 +120,10 @@
120 120 ?int $parentId = null,
121 121 int $rows = 0,
122 122 int $rowIndex = 0,
123 123 int $columnIndex = 0,
124 - int $width = 100
124 + int $width = 100,
125 + ?string $pageId = null
125 126 ) {
126 127 $this->id = $this->validateId($id);
127 128 $this->formId = $this->validateId($formId);
128 129 $this->fieldIndex = $this->validateId($fieldIndex);
@@ -131,8 +132,9 @@
131 132 $this->rowIndex = $this->validateRowIndex($rowIndex);
132 133 $this->columnIndex = $this->validateColumnIndex($columnIndex);
133 134 $this->width = $this->validateWidth($width);
134 135 $this->parentId = $this->validateParentId($parentId);
136 + $this->pageId = $pageId;
135 137 $this->generalSettings = $generalSettings;
136 138 $this->fieldOptions = $fieldOptions;
137 139 $this->advancedSettings = $advancedSettings;
138 140 $this->rows = $this->validateRows($rows);
@@ -476,10 +478,8 @@
476 478 public function setRows(int $rows): void
477 479 {
478 480 $this->rows = $rows;
479 481 }
480 -
481 -
482 482
483 483 /**
484 484 * Get the general settings object.
485 485 *