Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
253 / 253 |
|
100.00% |
20 / 20 |
CRAP | |
100.00% |
1 / 1 |
Scope | |
100.00% |
253 / 253 |
|
100.00% |
20 / 20 |
33 | |
100.00% |
1 / 1 |
getQueryLastWaitingNumber | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getQueryGivenNumbersInContingent | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getQuerySimpleClusterMatch | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getQuerySimpleDepartmentMatch | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getQueryReadImageData | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getQueryWriteImageData | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getQueryDeleteImage | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
addJoin | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
1 | |||
addRequiredJoins | |
100.00% |
22 / 22 |
|
100.00% |
1 / 1 |
1 | |||
getEntityMapping | |
100.00% |
85 / 85 |
|
100.00% |
1 / 1 |
1 | |||
addConditionScopeId | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
addConditionWithAdminEmail | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
addSelectWorkstationCount | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
1 | |||
addConditionProviderId | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
addConditionDepartmentId | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
addConditionClusterId | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
reverseEntityMapping | |
100.00% |
72 / 72 |
|
100.00% |
1 / 1 |
6 | |||
setEmergencyEntityMapping | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
setGhostWorkstationCountEntityMapping | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
postProcess | |
100.00% |
25 / 25 |
|
100.00% |
1 / 1 |
9 |
1 | <?php |
2 | |
3 | namespace BO\Zmsdb\Query; |
4 | |
5 | class Scope extends Base implements MappingInterface |
6 | { |
7 | /** |
8 | * @var String TABLE mysql table reference |
9 | */ |
10 | const TABLE = 'standort'; |
11 | |
12 | const QUERY_BY_DEPARTMENTID = 'SELECT |
13 | scope.`StandortID` AS id |
14 | FROM `standort` scope |
15 | WHERE |
16 | scope.`BehoerdenID` = :department_id |
17 | '; |
18 | |
19 | public function getQueryLastWaitingNumber() |
20 | { |
21 | return ' |
22 | SELECT letztewartenr |
23 | FROM `standort` scope |
24 | WHERE scope.`StandortID` = :scope_id LIMIT 1 FOR UPDATE'; |
25 | } |
26 | |
27 | public function getQueryGivenNumbersInContingent() |
28 | { |
29 | return ' |
30 | SELECT * |
31 | FROM `standort` scope |
32 | WHERE |
33 | scope.`StandortID` = :scope_id AND |
34 | IF( |
35 | scope.`wartenummernkontingent` > 0, |
36 | IF( |
37 | isNull(scope.`vergebenewartenummern`), |
38 | 0, |
39 | scope.`vergebenewartenummern` |
40 | ) < scope.`wartenummernkontingent`, |
41 | scope.`StandortID` |
42 | ) |
43 | '; |
44 | } |
45 | |
46 | public function getQuerySimpleClusterMatch() |
47 | { |
48 | return ' |
49 | SELECT standortID AS id |
50 | FROM `clusterzuordnung` |
51 | WHERE |
52 | clusterID = ? |
53 | '; |
54 | } |
55 | |
56 | public function getQuerySimpleDepartmentMatch() |
57 | { |
58 | return ' |
59 | SELECT s.StandortID AS id, p.name AS contact__name |
60 | FROM `standort` AS s |
61 | LEFT JOIN `provider` AS p ON s.InfoDienstleisterID = p.id |
62 | AND p.source = s.source |
63 | WHERE |
64 | s.BehoerdenID = ? |
65 | '; |
66 | } |
67 | |
68 | public function getQueryReadImageData() |
69 | { |
70 | return ' |
71 | SELECT `imagecontent`, `imagename` |
72 | FROM `imagedata` |
73 | WHERE |
74 | `imagename` LIKE :imagename |
75 | '; |
76 | } |
77 | |
78 | public function getQueryWriteImageData() |
79 | { |
80 | return ' |
81 | REPLACE INTO `imagedata` |
82 | SET |
83 | imagename=:imagename, |
84 | imagecontent=:imagedata |
85 | '; |
86 | } |
87 | |
88 | public function getQueryDeleteImage() |
89 | { |
90 | return ' |
91 | DELETE FROM `imagedata` |
92 | WHERE |
93 | `imagename` LIKE :imagename |
94 | '; |
95 | } |
96 | |
97 | public function addJoin() |
98 | { |
99 | $this->leftJoin( |
100 | new Alias(Provider::getTablename(), 'provider'), |
101 | self::expression('scope.InfoDienstleisterID = provider.id && scope.source = provider.source') |
102 | ); |
103 | $providerQuery = new Provider($this, $this->getPrefixed('provider__')); |
104 | return [$providerQuery]; |
105 | } |
106 | |
107 | protected function addRequiredJoins() |
108 | { |
109 | $this->leftJoin( |
110 | new Alias(Department::TABLE, 'scopedepartment'), |
111 | 'scope.BehoerdenID', |
112 | '=', |
113 | 'scopedepartment.BehoerdenID' |
114 | ); |
115 | $this->leftJoin( |
116 | new Alias('sms', 'scopesms'), |
117 | 'scopedepartment.BehoerdenID', |
118 | '=', |
119 | 'scopesms.BehoerdenID' |
120 | ); |
121 | $this->leftJoin( |
122 | new Alias('email', 'scopemail'), |
123 | 'scopedepartment.BehoerdenID', |
124 | '=', |
125 | 'scopemail.BehoerdenID' |
126 | ); |
127 | $this->leftJoin( |
128 | new Alias(Provider::getTablename(), 'scopeprovider'), |
129 | self::expression('scope.InfoDienstleisterID = scopeprovider.id && scope.source = scopeprovider.source') |
130 | ); |
131 | } |
132 | |
133 | //Todo: now() Parameter to enable query cache |
134 | public function getEntityMapping() |
135 | { |
136 | return [ |
137 | 'hint' => 'scope.Hinweis', |
138 | 'id' => 'scope.StandortID', |
139 | 'contact__name' => 'scopeprovider.name', |
140 | 'contact__street' => 'scope.Adresse', |
141 | 'contact__email' => 'scope.emailstandortadmin', |
142 | 'contact__country' => self::expression('"Germany"'), |
143 | 'lastChange' => 'scope.updateTimestamp', |
144 | 'preferences__appointment__deallocationDuration' => 'scope.loeschdauer', |
145 | 'preferences__appointment__infoForAppointment' => 'scope.info_for_appointment', |
146 | 'preferences__appointment__endInDaysDefault' => 'scope.Termine_bis', |
147 | 'preferences__appointment__multipleSlotsEnabled' => 'scope.mehrfachtermine', |
148 | 'preferences__appointment__reservationDuration' => 'scope.reservierungsdauer', |
149 | 'preferences__appointment__activationDuration' => 'scope.aktivierungsdauer', |
150 | 'preferences__appointment__startInDaysDefault' => 'scope.Termine_ab', |
151 | 'preferences__appointment__notificationConfirmationEnabled' => |
152 | self::expression('scopesms.enabled && scopesms.Absender != "" && scopesms.internetbestaetigung'), |
153 | 'preferences__appointment__notificationHeadsUpEnabled' => |
154 | self::expression('scopesms.enabled && scopesms.Absender != "" && scopesms.interneterinnerung'), |
155 | 'preferences__client__alternateAppointmentUrl' => 'scope.qtv_url', |
156 | 'preferences__client__amendmentActivated' => 'scope.anmerkungPflichtfeld', |
157 | 'preferences__client__amendmentLabel' => 'scope.anmerkungLabel', |
158 | 'preferences__client__emailFrom' => 'scopemail.absenderadresse', |
159 | 'preferences__client__emailRequired' => 'scope.emailPflichtfeld', |
160 | 'preferences__client__emailConfirmationActivated' => 'scope.email_confirmation_activated', |
161 | 'preferences__client__telephoneActivated' => 'scope.telefonaktiviert', |
162 | 'preferences__client__telephoneRequired' => 'scope.telefonPflichtfeld', |
163 | 'preferences__client__appointmentsPerMail' => 'scope.appointments_per_mail', |
164 | 'preferences__client__slotsPerAppointment' => 'scope.slots_per_appointment', |
165 | 'preferences__client__whitelistedMails' => 'scope.whitelisted_mails', |
166 | 'preferences__client__customTextfieldActivated' => 'scope.custom_text_field_active', |
167 | 'preferences__client__customTextfieldRequired' => 'scope.custom_text_field_required', |
168 | 'preferences__client__customTextfieldLabel' => 'scope.custom_text_field_label', |
169 | 'preferences__client__captchaActivatedRequired' => 'scope.captcha_activated_required', |
170 | 'preferences__client__adminMailOnAppointment' => 'scope.admin_mail_on_appointment', |
171 | 'preferences__client__adminMailOnDeleted' => 'scope.admin_mail_on_deleted', |
172 | 'preferences__client__adminMailOnUpdated' => 'scope.admin_mail_on_updated', |
173 | 'preferences__client__adminMailOnMailSent' => 'scope.admin_mail_on_mail_sent', |
174 | 'preferences__notifications__confirmationContent' => 'scope.smsbestaetigungstext', |
175 | 'preferences__notifications__headsUpContent' => 'scope.smsbenachrichtigungstext', |
176 | 'preferences__notifications__headsUpTime' => 'scope.smsbenachrichtigungsfrist', |
177 | 'preferences__pickup__alternateName' => 'scope.ausgabeschaltername', |
178 | 'preferences__pickup__isDefault' => 'scope.defaultabholerstandort', |
179 | 'preferences__queue__callCountMax' => 'scope.anzahlwiederaufruf', |
180 | 'preferences__queue__callDisplayText' => 'scope.aufrufanzeigetext', |
181 | 'preferences__queue__firstNumber' => 'scope.startwartenr', |
182 | 'preferences__queue__lastNumber' => 'scope.endwartenr', |
183 | 'preferences__queue__maxNumberContingent' => 'scope.wartenummernkontingent', |
184 | 'preferences__queue__processingTimeAverage' => self::expression( |
185 | 'FLOOR(TIME_TO_SEC(`scope`.`Bearbeitungszeit`) / 60)' |
186 | ), |
187 | 'preferences__queue__publishWaitingTimeEnabled' => 'scope.wartezeitveroeffentlichen', |
188 | 'preferences__queue__statisticsEnabled' => self::expression('NOT `scope`.`ohnestatistik`'), |
189 | 'preferences__survey__emailContent' => 'scope.kundenbef_emailtext', |
190 | 'preferences__survey__enabled' => 'scope.kundenbefragung', |
191 | 'preferences__survey__label' => 'scope.kundenbef_label', |
192 | 'preferences__ticketprinter__buttonName' => self::expression( |
193 | 'IF(`scope`.`standortinfozeile`!="", `scope`.`standortinfozeile`, `scope`.`Bezeichnung`)' |
194 | ), |
195 | 'preferences__ticketprinter__confirmationEnabled' => 'scope.smswmsbestaetigung', |
196 | 'preferences__ticketprinter__deactivatedText' => 'scope.wartenrhinweis', |
197 | 'preferences__ticketprinter__notificationsAmendmentEnabled' => 'scope.smsnachtrag', |
198 | 'preferences__ticketprinter__notificationsEnabled' => 'scope.smswarteschlange', |
199 | 'preferences__ticketprinter__notificationsDelay' => 'scope.smskioskangebotsfrist', |
200 | 'preferences__workstation__emergencyEnabled' => 'scope.notruffunktion', |
201 | 'preferences__workstation__emergencyRefreshInterval' => self::expression( |
202 | '(SELECT `value` FROM config WHERE `name`="emergency__refreshInterval")' |
203 | ), |
204 | 'shortName' => 'scope.standortkuerzel', |
205 | 'status__emergency__acceptedByWorkstation' => 'scope.notrufantwort', |
206 | 'status__emergency__activated' => 'scope.notrufausgeloest', |
207 | 'status__emergency__calledByWorkstation' => 'scope.notrufinitiierung', |
208 | 'status__queue__ghostWorkstationCount' => 'scope.virtuellesachbearbeiterzahl', |
209 | 'status__queue__givenNumberCount' => 'scope.vergebenewartenummern', |
210 | 'status__queue__lastGivenNumber' => 'scope.letztewartenr', |
211 | 'status__queue__lastGivenNumberTimestamp' => 'scope.wartenrdatum', |
212 | 'status__ticketprinter__deactivated' => 'scope.wartenrsperre', |
213 | 'provider__id' => self::expression( |
214 | 'IF(`scopeprovider`.`id`!="", `scopeprovider`.`id`, `scope`.`InfoDienstleisterID`)' |
215 | ), |
216 | 'provider__source' => self::expression( |
217 | 'IF(`scopeprovider`.`source`!="", `scopeprovider`.`source`, `scope`.`source`)' |
218 | ), |
219 | 'source' => 'scope.source' |
220 | ]; |
221 | } |
222 | |
223 | public function addConditionScopeId($scopeId) |
224 | { |
225 | $this->query->where('scope.StandortID', '=', $scopeId); |
226 | return $this; |
227 | } |
228 | |
229 | public function addConditionWithAdminEmail() |
230 | { |
231 | $this->query->where('scope.emailstandortadmin', '!=', ''); |
232 | return $this; |
233 | } |
234 | |
235 | public function addSelectWorkstationCount($dateTime) |
236 | { |
237 | $this->query->select( |
238 | ['status__queue__workstationCount' => self::expression(' |
239 | IF( |
240 | `scope`.`virtuellesachbearbeiterzahl` > -1, |
241 | `scope`.`virtuellesachbearbeiterzahl`, |
242 | ( |
243 | SELECT COUNT(*) |
244 | FROM nutzer |
245 | WHERE nutzer.StandortID = scope.StandortID |
246 | AND nutzer.Datum = "' . $dateTime->format('Y-m-d') . '" |
247 | AND nutzer.Arbeitsplatznr <> 0 |
248 | ) |
249 | ) |
250 | ') |
251 | ] |
252 | ); |
253 | } |
254 | |
255 | public function addConditionProviderId($providerId) |
256 | { |
257 | $this->query->where('scope.InfoDienstleisterID', '=', $providerId); |
258 | return $this; |
259 | } |
260 | |
261 | public function addConditionDepartmentId($departmentId) |
262 | { |
263 | $this->query->where('scope.BehoerdenID', '=', $departmentId); |
264 | return $this; |
265 | } |
266 | |
267 | public function addConditionClusterId($clusterId) |
268 | { |
269 | $this->leftJoin( |
270 | new Alias('clusterzuordnung', 'cluster_scope'), |
271 | 'scope.StandortID', |
272 | '=', |
273 | 'cluster_scope.standortID' |
274 | ); |
275 | $this->query->where('cluster_scope.clusterID', '=', $clusterId); |
276 | return $this; |
277 | } |
278 | |
279 | public function reverseEntityMapping(\BO\Zmsentities\Scope $entity, $parentId = null) |
280 | { |
281 | $data = array(); |
282 | if ($parentId) { |
283 | $data['BehoerdenID'] = $parentId; |
284 | } |
285 | $data['InfoDienstleisterID'] = $entity->getProviderId(); |
286 | $data['emailstandortadmin'] = $entity->getContactEMail(); |
287 | $data['standortinfozeile'] = $entity->getScopeInfo(); |
288 | $data['Hinweis'] = $entity->getScopeHint(); |
289 | $data['Bezeichnung'] = $entity->getName(); |
290 | $data['standortkuerzel'] = $entity->shortName; |
291 | $data['Adresse'] = (isset($entity->contact['street'])) ? $entity->contact['street'] : ''; |
292 | $data['loeschdauer'] = $entity->getPreference('appointment', 'deallocationDuration'); |
293 | $data['info_for_appointment'] = $entity->getPreference('appointment', 'infoForAppointment'); |
294 | $data['Termine_bis'] = $entity->getPreference('appointment', 'endInDaysDefault'); |
295 | $data['Termine_ab'] = $entity->getPreference('appointment', 'startInDaysDefault'); |
296 | $data['mehrfachtermine'] = $entity->getPreference('appointment', 'multipleSlotsEnabled', true); |
297 | // notificationConfirmationEnabled and notificationHeadsUpEnabled are saved in department! |
298 | $data['reservierungsdauer'] = $entity->getPreference('appointment', 'reservationDuration'); |
299 | $data['aktivierungsdauer'] = $entity->getPreference('appointment', 'activationDuration'); |
300 | $data['qtv_url'] = $entity->getPreference('client', 'alternateAppointmentUrl'); |
301 | $data['anmerkungPflichtfeld'] = $entity->getPreference('client', 'amendmentActivated', true); |
302 | $data['anmerkungLabel'] = $entity->getPreference('client', 'amendmentLabel'); |
303 | $data['emailPflichtfeld'] = $entity->getPreference('client', 'emailRequired', true); |
304 | $data['email_confirmation_activated'] = $entity->getPreference('client', 'emailConfirmationActivated', true); |
305 | $data['telefonaktiviert'] = $entity->getPreference('client', 'telephoneActivated', true); |
306 | $data['telefonPflichtfeld'] = $entity->getPreference('client', 'telephoneRequired', true); |
307 | $data['custom_text_field_active'] = $entity->getPreference('client', 'customTextfieldActivated', true); |
308 | $data['custom_text_field_required'] = $entity->getPreference('client', 'customTextfieldRequired', true); |
309 | $data['custom_text_field_label'] = $entity->getPreference('client', 'customTextfieldLabel'); |
310 | $data['captcha_activated_required'] = $entity->getPreference('client', 'captchaActivatedRequired'); |
311 | $data['appointments_per_mail'] = (int) $entity->getPreference('client', 'appointmentsPerMail'); |
312 | $data['slots_per_appointment'] = (int) $entity->getPreference('client', 'slotsPerAppointment'); |
313 | $data['info_for_appointment'] = $entity->getPreference('appointment', 'infoForAppointment'); |
314 | $data['whitelisted_mails'] = $entity->getPreference('client', 'whitelistedMails'); |
315 | $data['admin_mail_on_appointment'] = $entity->getPreference('client', 'adminMailOnAppointment', true); |
316 | $data['admin_mail_on_deleted'] = $entity->getPreference('client', 'adminMailOnDeleted'); |
317 | $data['admin_mail_on_updated'] = $entity->getPreference('client', 'adminMailOnUpdated', true); |
318 | $data['admin_mail_on_mail_sent'] = $entity->getPreference('client', 'adminMailOnMailSent', true); |
319 | $data['smsbestaetigungstext'] = $entity->getPreference('notifications', 'confirmationContent'); |
320 | $data['smsbenachrichtigungstext'] = $entity->getPreference('notifications', 'headsUpContent'); |
321 | $data['smsbenachrichtigungsfrist'] = $entity->getPreference('notifications', 'headsUpTime'); |
322 | $data['ausgabeschaltername'] = $entity->getPreference('pickup', 'alternateName'); |
323 | $data['defaultabholerstandort'] = $entity->getPreference('pickup', 'isDefault', true); |
324 | $data['anzahlwiederaufruf'] = $entity->getPreference('queue', 'callCountMax'); |
325 | $data['aufrufanzeigetext'] = $entity->getPreference('queue', 'callDisplayText', false, ''); |
326 | $data['startwartenr'] = $entity->getPreference('queue', 'firstNumber'); |
327 | $data['endwartenr'] = $entity->getPreference('queue', 'lastNumber'); |
328 | $data['wartenummernkontingent'] = $entity->getPreference('queue', 'maxNumberContingent'); |
329 | $data['Bearbeitungszeit'] = gmdate("H:i", $entity->getPreference('queue', 'processingTimeAverage') * 60); |
330 | $data['wartezeitveroeffentlichen'] = $entity->getPreference('queue', 'publishWaitingTimeEnabled', true); |
331 | $data['ohnestatistik'] = (0 == $entity->getPreference('queue', 'statisticsEnabled', true)) ? 1 : 0; |
332 | $data['kundenbef_emailtext'] = $entity->getPreference('survey', 'emailContent'); |
333 | $data['kundenbefragung'] = $entity->getPreference('survey', 'enabled', true); |
334 | $data['kundenbef_label'] = $entity->getPreference('survey', 'label'); |
335 | $data['smswmsbestaetigung'] = $entity->getPreference('ticketprinter', 'confirmationEnabled', true); |
336 | $data['wartenrhinweis'] = $entity->getPreference('ticketprinter', 'deactivatedText', false, ''); |
337 | $data['smsnachtrag'] = $entity->getPreference('ticketprinter', 'notificationsAmendmentEnabled', true); |
338 | $data['smswarteschlange'] = $entity->getPreference('ticketprinter', 'notificationsEnabled', true); |
339 | $data['smskioskangebotsfrist'] = $entity->getPreference('ticketprinter', 'notificationsDelay'); |
340 | $data['notruffunktion'] = $entity->getPreference('workstation', 'emergencyEnabled', true); |
341 | $data['notrufantwort'] = $entity->getStatus('emergency', 'acceptedByWorkstation'); |
342 | $data['notrufausgeloest'] = $entity->getStatus('emergency', 'activated'); |
343 | $data['notrufinitiierung'] = $entity->getStatus('emergency', 'calledByWorkstation'); |
344 | $data['virtuellesachbearbeiterzahl'] = $entity->getStatus('queue', 'ghostWorkstationCount'); |
345 | $data['vergebenewartenummern'] = $entity->getStatus('queue', 'givenNumberCount'); |
346 | $data['letztewartenr'] = $entity->getStatus('queue', 'lastGivenNumber'); |
347 | $lastGivenTimestamp = $entity->getStatus('queue', 'lastGivenNumberTimestamp'); |
348 | $data['wartenrdatum'] = ($lastGivenTimestamp) ? date('Y-m-d', $lastGivenTimestamp) : null; |
349 | $data['wartenrsperre'] = $entity->getStatus('ticketprinter', 'deactivated'); |
350 | $data['source'] = $entity->getProvider()->source; |
351 | |
352 | $data = array_filter($data, function ($value) { |
353 | return ($value !== null && $value !== false); |
354 | }); |
355 | return $data; |
356 | } |
357 | |
358 | public function setEmergencyEntityMapping(\BO\Zmsentities\Scope $entity) |
359 | { |
360 | $data['notrufantwort'] = ($entity->toProperty()->status->emergency->acceptedByWorkstation->get(-1)); |
361 | $data['notrufausgeloest'] = intval($entity->toProperty()->status->emergency->activated->get(0)); |
362 | $data['notrufinitiierung'] = ($entity->toProperty()->status->emergency->calledByWorkstation->get(-1)); |
363 | return $data; |
364 | } |
365 | |
366 | public function setGhostWorkstationCountEntityMapping(\BO\Zmsentities\Scope $entity, \DateTimeInterface $dateTime) |
367 | { |
368 | $data['virtuellesachbearbeiterzahl'] = $entity->getStatus('queue', 'ghostWorkstationCount'); |
369 | $data['datumvirtuellesachbearbeiterzahl'] = $dateTime->format('Y-m-d'); |
370 | return $data; |
371 | } |
372 | |
373 | public function postProcess($data) |
374 | { |
375 | $data[$this->getPrefixed("status__queue__lastGivenNumberTimestamp")] = |
376 | strtotime($data[$this->getPrefixed("status__queue__lastGivenNumberTimestamp")]); |
377 | $data[$this->getPrefixed("lastChange")] = |
378 | (new \DateTime($data[$this->getPrefixed("lastChange")] . \BO\Zmsdb\Connection\Select::$connectionTimezone)) |
379 | ->getTimestamp(); |
380 | if (!$data[$this->getPrefixed('preferences__client__emailFrom')]) { |
381 | $data[$this->getPrefixed("preferences__client__emailRequired")] = 0; |
382 | } |
383 | if (!$data[$this->getPrefixed('preferences__client__telephoneActivated')]) { |
384 | $data[$this->getPrefixed("preferences__client__telephoneRequired")] = 0; |
385 | } |
386 | if (!$data[$this->getPrefixed('preferences__client__emailConfirmationActivated')]) { |
387 | $data[$this->getPrefixed("preferences__client__emailConfirmationActivated")] = 0; |
388 | } |
389 | if (!$data[$this->getPrefixed('contact__email')]) { |
390 | $data[$this->getPrefixed("preferences__client__adminMailOnAppointment")] = 0; |
391 | $data[$this->getPrefixed("preferences__client__adminMailOnDeleted")] = 0; |
392 | $data[$this->getPrefixed("preferences__client__adminMailOnUpdated")] = 0; |
393 | $data[$this->getPrefixed("preferences__client__adminMailOnMailSent")] = 0; |
394 | } |
395 | if (!$data[$this->getPrefixed('preferences__client__customTextfieldActivated')]) { |
396 | $data[$this->getPrefixed("preferences__client__customTextfieldRequired")] = 0; |
397 | } |
398 | if (!$data[$this->getPrefixed('preferences__client__appointmentsPerMail')]) { |
399 | $data[$this->getPrefixed("preferences__client__appointmentsPerMail")] = null; |
400 | } |
401 | if (!$data[$this->getPrefixed('preferences__client__slotsPerAppointment')]) { |
402 | $data[$this->getPrefixed("preferences__client__slotsPerAppointment")] = null; |
403 | } |
404 | if (!$data[$this->getPrefixed('preferences__client__whitelistedMails')]) { |
405 | $data[$this->getPrefixed("preferences__client__whitelistedMails")] = null; |
406 | } |
407 | return $data; |
408 | } |
409 | } |