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 +47 -16 0.9 → 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.
@@ -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
@@ -237,8 +250,28 @@
237 250 $this->fieldGeneralSettings->setPhoneAutoDetect($val);
238 251 }
239 252
240 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 + /**
241 274 * Get showRatingText flag.
242 275 *
243 276 * @return bool
244 277 */
@@ -256,29 +289,27 @@
256 289 {
257 290 $this->fieldGeneralSettings->setShowRatingText($val);
258 291 }
259 292
260 -
261 293 /**
262 - * Get the HTML content of the form field.
294 + * Get the agreement text of the form field.
263 295 *
264 - * @return string The HTML content.
296 + * @return string The agreement text.
265 297 */
266 - public function getHtmlContent(): string
298 + public function getAgreementText(): string
267 299 {
268 - return $this->fieldGeneralSettings->getHtmlContent();
300 + return $this->fieldGeneralSettings->getAgreementText();
269 301 }
270 302
271 303 /**
272 - * Set the HTML content of the form field.
304 + * Set the agreement text of the form field.
273 305 *
274 - * @param string $htmlContent The HTML content to set.
306 + * @param string $agreementText The agreement text to set.
275 307 */
276 - public function setHtmlContent(string $htmlContent): void
308 + public function setAgreementText(string $agreementText): void
277 309 {
278 - $this->fieldGeneralSettings->setHtmlContent($htmlContent);
310 + $this->fieldGeneralSettings->setAgreementText($agreementText);
279 311 }
280 -
281 312
282 313 /**
283 314 * @return bool
284 315 */