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/Field/FieldGeneralSettings.php +104 -14 0.4 → 1.5 View file →
@@ -3,13 +3,8 @@
3 3 namespace IvyForms\Entity\Field;
4 4
5 5 use IvyForms\ValueObjects\Field\FieldGeneralSettings as FieldGeneralSettingsVO;
6 6
7 -// phpcs:disable PSR1.Files.SideEffects
8 -if (!defined('ABSPATH')) {
9 - exit; // Exit if accessed directly
10 -}
11 -
12 7 /**
13 8 * Class FieldGeneralSettings
14 9 *
15 10 * Entity wrapper for FieldGeneralSettings ValueObject.
@@ -143,11 +138,11 @@
143 138 }
144 139 /**
145 140 * Get minimum value constraint.
146 141 *
147 - * @return float
142 + * @return float|null
148 143 */
149 - public function getMinValue(): float
144 + public function getMinValue(): ?float
150 145 {
151 146 return $this->fieldGeneralSettings->getMinValue();
152 147 }
153 148
@@ -153,11 +148,11 @@
153 148
154 149 /**
155 150 * Set minimum value constraint.
156 151 *
157 - * @param float $minValue
152 + * @param float|null $minValue
158 153 */
159 - public function setMinValue(float $minValue): void
154 + public function setMinValue(?float $minValue): void
160 155 {
161 156 $this->fieldGeneralSettings->setMinValue($minValue);
162 157 }
163 158
@@ -163,11 +158,11 @@
163 158
164 159 /**
165 160 * Get maximum value constraint.
166 161 *
167 - * @return float
162 + * @return float|null
168 163 */
169 - public function getMaxValue(): float
164 + public function getMaxValue(): ?float
170 165 {
171 166 return $this->fieldGeneralSettings->getMaxValue();
172 167 }
173 168
@@ -173,11 +168,11 @@
173 168
174 169 /**
175 170 * Set maximum value constraint.
176 171 *
177 - * @param float $maxValue
172 + * @param float|null $maxValue
178 173 */
179 - public function setMaxValue(float $maxValue): void
174 + public function setMaxValue(?float $maxValue): void
180 175 {
181 176 $this->fieldGeneralSettings->setMaxValue($maxValue);
182 177 }
183 178
@@ -190,9 +185,9 @@
190 185 return $this->fieldGeneralSettings->getStep();
191 186 }
192 187
193 188 /**
194 - * Set step increment.
189 + * Set step value.
195 190 * @param float $step
196 191 */
197 192 public function setStep(float $step): void
198 193 {
@@ -199,8 +194,26 @@
199 194 $this->fieldGeneralSettings->setStep($step);
200 195 }
201 196
202 197 /**
198 + * Get show grid value.
199 + * @return bool
200 + */
201 + public function getShowGrid(): bool
202 + {
203 + return $this->fieldGeneralSettings->getShowGrid();
204 + }
205 +
206 + /**
207 + * Set show grid value.
208 + * @param bool $showGrid
209 + */
210 + public function setShowGrid(bool $showGrid): void
211 + {
212 + $this->fieldGeneralSettings->setShowGrid($showGrid);
213 + }
214 +
215 + /**
203 216 * Get number format key.
204 217 * @return string
205 218 */
206 219 public function getNumberFormat(): string
@@ -235,8 +248,85 @@
235 248 public function setPhoneAutoDetect(bool $val): void
236 249 {
237 250 $this->fieldGeneralSettings->setPhoneAutoDetect($val);
238 251 }
252 +
253 + /**
254 + * Get the HTML content of the form field.
255 + *
256 + * @return string The HTML content.
257 + */
258 + public function getHtmlContent(): string
259 + {
260 + return $this->fieldGeneralSettings->getHtmlContent();
261 + }
262 +
263 + /**
264 + * Set the HTML content of the form field.
265 + *
266 + * @param string $htmlContent The HTML content to set.
267 + */
268 + public function setHtmlContent(string $htmlContent): void
269 + {
270 + $this->fieldGeneralSettings->setHtmlContent($htmlContent);
271 + }
272 +
273 + /**
274 + * Get showRatingText flag.
275 + *
276 + * @return bool
277 + */
278 + public function isShowRatingText(): bool
279 + {
280 + return $this->fieldGeneralSettings->isShowRatingText();
281 + }
282 +
283 + /**
284 + * Set showRatingText flag.
285 + *
286 + * @param bool $val
287 + */
288 + public function setShowRatingText(bool $val): void
289 + {
290 + $this->fieldGeneralSettings->setShowRatingText($val);
291 + }
292 +
293 + /**
294 + * Get the agreement text of the form field.
295 + *
296 + * @return string The agreement text.
297 + */
298 + public function getAgreementText(): string
299 + {
300 + return $this->fieldGeneralSettings->getAgreementText();
301 + }
302 +
303 + /**
304 + * Set the agreement text of the form field.
305 + *
306 + * @param string $agreementText The agreement text to set.
307 + */
308 + public function setAgreementText(string $agreementText): void
309 + {
310 + $this->fieldGeneralSettings->setAgreementText($agreementText);
311 + }
312 +
313 + /**
314 + * @return bool
315 + */
316 + public function isLimitRange(): bool
317 + {
318 + return $this->fieldGeneralSettings->isLimitRange();
319 + }
320 +
321 + /**
322 + * @param bool $limitRange
323 + */
324 + public function setLimitRange(bool $limitRange): void
325 + {
326 + $this->fieldGeneralSettings->setLimitRange($limitRange);
327 + }
328 +
239 329 /**
240 330 * @return array<string, bool|string>
241 331 */
242 332 public function toArray(): array