PluginProbe
The Innovative Form Builder – IvyForms / 1.1
The Innovative Form Builder – IvyForms v1.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
ivyforms / backend / src / Entity / Field / FieldAdvancedSettings.php

FieldAdvancedSettings.php in The Innovative Form Builder – IvyForms 1.1, at backend/src/Entity/Field/FieldAdvancedSettings.php

172 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Entity\Field;
4
5 use IvyForms\ValueObjects\Field\FieldAdvancedSettings as FieldAdvancedSettingsVO;
6
7 /**
8 * Class fieldAdvancedSettings
9 *
10 * Entity wrapper for fieldAdvancedSettings ValueObject.
11 */
12 class FieldAdvancedSettings
13 {
14 private FieldAdvancedSettingsVO $fieldAdvancedSettings;
15
16 /**
17 * @param FieldAdvancedSettingsVO $fieldAdvancedSettings
18 */
19 public function __construct(FieldAdvancedSettingsVO $fieldAdvancedSettings)
20 {
21 $this->fieldAdvancedSettings = $fieldAdvancedSettings;
22 }
23
24 /**
25 * Check if maximum length limit is enabled.
26 *
27 * @return bool
28 */
29 public function isLimitMaxLength(): bool
30 {
31 return $this->fieldAdvancedSettings->isLimitMaxLength();
32 }
33
34 /**
35 * Set the limit maximum length setting.
36 *
37 * @param bool $limitMaxLength
38 */
39 public function setLimitMaxLength(bool $limitMaxLength): void
40 {
41 $this->fieldAdvancedSettings->setLimitMaxLength($limitMaxLength);
42 }
43
44 /**
45 * Get the maximum length.
46 *
47 * @return int
48 */
49 public function getMaxLength(): int
50 {
51 return $this->fieldAdvancedSettings->getMaxLength();
52 }
53
54 /**
55 * Set the maximum length setting.
56 *
57 * @param int $maxLength
58 */
59 public function setMaxLength(int $maxLength): void
60 {
61 $this->fieldAdvancedSettings->setMaxLength($maxLength);
62 }
63
64 /**
65 * Get the label position.
66 *
67 * @return string
68 */
69 public function getLabelPosition(): string
70 {
71 return $this->fieldAdvancedSettings->getLabelPosition();
72 }
73
74 /**
75 * Set the label position setting.
76 *
77 * @param string $labelPosition
78 */
79 public function setLabelPosition(string $labelPosition): void
80 {
81 $this->fieldAdvancedSettings->setLabelPosition($labelPosition);
82 }
83
84 /**
85 * Check if no duplicates is enabled.
86 *
87 * @return bool
88 */
89 public function isNoDuplicates(): bool
90 {
91 return $this->fieldAdvancedSettings->isNoDuplicates();
92 }
93
94 /**
95 * Set the no duplicates setting.
96 *
97 * @param bool $noDuplicates
98 */
99 public function setNoDuplicates(bool $noDuplicates): void
100 {
101 $this->fieldAdvancedSettings->setNoDuplicates($noDuplicates);
102 }
103
104 /**
105 * Get the default value of the form field.
106 *
107 * @return string The default value of the form field.
108 */
109 public function getDefaultValue(): string
110 {
111 return $this->fieldAdvancedSettings->getDefaultValue();
112 }
113
114 /**
115 * Set the default value of the form field.
116 *
117 * @param string $defaultValue The default value to set.
118 */
119 public function setDefaultValue(string $defaultValue): void
120 {
121 $this->fieldAdvancedSettings->setDefaultValue($defaultValue);
122 }
123
124 /**
125 * Get the field prefix.
126 *
127 * @return string
128 */
129 public function getInputPrefix(): string
130 {
131 return $this->fieldAdvancedSettings->getInputPrefix();
132 }
133
134 /**
135 * Set the field prefix.
136 *
137 * @param string $prefix
138 */
139 public function setInputPrefix(string $prefix): void
140 {
141 $this->fieldAdvancedSettings->setInputPrefix($prefix);
142 }
143
144 /**
145 * Get the field suffix.
146 *
147 * @return string
148 */
149 public function getInputSuffix(): string
150 {
151 return $this->fieldAdvancedSettings->getInputSuffix();
152 }
153
154 /**
155 * Set the field suffix.
156 *
157 * @param string $suffix
158 */
159 public function setInputSuffix(string $suffix): void
160 {
161 $this->fieldAdvancedSettings->setInputSuffix($suffix);
162 }
163
164 /**
165 * @return array<string, bool|string>
166 */
167 public function toArray(): array
168 {
169 return $this->fieldAdvancedSettings->toArray();
170 }
171 }
172