1 | <?php |
||
12 | class CustomField |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $id; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $contactListId; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $type; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $label; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | private $alias; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $default; |
||
43 | |||
44 | /** |
||
45 | * @var CustomFieldChoiceCollection |
||
46 | */ |
||
47 | private $choices; |
||
48 | |||
49 | /** |
||
50 | * CustomField constructor. |
||
51 | * |
||
52 | * @param string $alias |
||
53 | * @param string|null $id |
||
54 | */ |
||
55 | public function __construct($alias, $id = null) |
||
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | public function __toString() |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getId() |
||
78 | |||
79 | /** |
||
80 | * @param string $id |
||
81 | */ |
||
82 | public function setId($id) |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getContactListId() |
||
94 | |||
95 | /** |
||
96 | * @param string $contactListId |
||
97 | */ |
||
98 | public function setContactListId($contactListId) |
||
102 | |||
103 | /** |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getType() |
||
110 | |||
111 | /** |
||
112 | * @param string $type |
||
113 | */ |
||
114 | public function setType($type) |
||
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getLabel() |
||
126 | |||
127 | /** |
||
128 | * @param string $label |
||
129 | */ |
||
130 | public function setLabel($label) |
||
134 | |||
135 | /** |
||
136 | * @return string |
||
137 | */ |
||
138 | public function getAlias() |
||
142 | |||
143 | /** |
||
144 | * @param string $alias |
||
145 | */ |
||
146 | public function setAlias($alias) |
||
150 | |||
151 | /** |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getDefault() |
||
158 | |||
159 | /** |
||
160 | * @param string $default |
||
161 | */ |
||
162 | public function setDefault($default) |
||
166 | |||
167 | /** |
||
168 | * @return CustomFieldChoiceCollection |
||
169 | */ |
||
170 | public function getChoices() |
||
174 | |||
175 | /** |
||
176 | * @param CustomFieldChoiceCollection $choices |
||
177 | */ |
||
178 | public function setChoices(CustomFieldChoiceCollection $choices) |
||
182 | |||
183 | /** |
||
184 | * @param string $alias |
||
185 | * |
||
186 | * @return bool |
||
187 | */ |
||
188 | public function hasChoice($alias) |
||
196 | |||
197 | /** |
||
198 | * @param array $exclude |
||
199 | * @param bool $clean |
||
200 | * @return array |
||
201 | */ |
||
202 | public function toAPI(array $exclude = [], $clean = true) |
||
226 | |||
227 | /** |
||
228 | * @param array $data |
||
229 | */ |
||
230 | public function fromAPI(array $data) |
||
252 | } |
||
253 |