@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | if ($doc !== null) { |
165 | 165 | $this->document->setCurrentDocument($doc); |
166 | 166 | } else { |
167 | - $this->logger->error('Failed to load document with record ID "' . $this->requestData['recordId'] . '"'); |
|
167 | + $this->logger->error('Failed to load document with record ID "'.$this->requestData['recordId'].'"'); |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | } else { |
171 | - $this->logger->error('Invalid ID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
171 | + $this->logger->error('Invalid ID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | && !MathUtility::canBeInterpretedAsInteger($this->requestData['id']) |
266 | 266 | && !GeneralUtility::isValidUrl($this->requestData['id']) |
267 | 267 | ) { |
268 | - $this->logger->warning('Invalid ID or URI "' . $this->requestData['id'] . '" for document loading'); |
|
268 | + $this->logger->warning('Invalid ID or URI "'.$this->requestData['id'].'" for document loading'); |
|
269 | 269 | unset($this->requestData['id']); |
270 | 270 | } |
271 | 271 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | { |
326 | 326 | if (!array_key_exists($setting, $this->settings) || empty($this->settings[$setting])) { |
327 | 327 | $this->settings[$setting] = $value; |
328 | - $this->logger->warning('Setting "' . $setting . '" not set, using default value "' . $value . '". Probably FlexForm for controller "' . get_class($this) . '" is not read.'); |
|
328 | + $this->logger->warning('Setting "'.$setting.'" not set, using default value "'.$value.'". Probably FlexForm for controller "'.get_class($this).'" is not read.'); |
|
329 | 329 | } else { |
330 | 330 | $this->settings[$setting] = (int) $this->settings[$setting]; |
331 | 331 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $pages = []; |
411 | 411 | $pagesSect = []; |
412 | 412 | $aRange = []; |
413 | - $nRange = 5; // ToDo: should be made configurable |
|
413 | + $nRange = 5; // ToDo: should be made configurable |
|
414 | 414 | |
415 | 415 | // lower limit of the range |
416 | 416 | $nBottom = $currentPageNumber - $nRange; |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | |
426 | 426 | // check whether the first screen page is > 1, if yes then points must be added |
427 | 427 | if ($aRange[0] > 1) { |
428 | - array_push($pagesSect, ['label' => '...','startRecordNumber' => '...']); |
|
428 | + array_push($pagesSect, ['label' => '...', 'startRecordNumber' => '...']); |
|
429 | 429 | }; |
430 | 430 | $lastStartRecordNumberGrid = 0; // due to validity outside the loop |
431 | 431 | foreach (range($firstPage, $lastPage) as $i) { |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | // Check if screen page is in range |
470 | 470 | if (in_array($i, $aRange)) { |
471 | - array_push($pagesSect, ['label' => $i,'startRecordNumber' => $startRecordNumber]); |
|
471 | + array_push($pagesSect, ['label' => $i, 'startRecordNumber' => $startRecordNumber]); |
|
472 | 472 | }; |
473 | 473 | }; |
474 | 474 | }; |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | // fix for count(): Argument #1 ($value) must be of type Countable|array, null given |
535 | 535 | $this->documentArray[] = $doc; |
536 | 536 | } else { |
537 | - $this->logger->error('Invalid UID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
537 | + $this->logger->error('Invalid UID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
538 | 538 | } |
539 | 539 | |
540 | 540 | return $doc; |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | foreach ($this->requestData['multipleSource'] as $location) { |
573 | 573 | $document = AbstractDocument::getInstance($location, $this->settings, true); |
574 | 574 | if ($document !== null) { |
575 | - $this->documentArray['extra_' . $i] = $document; |
|
575 | + $this->documentArray['extra_'.$i] = $document; |
|
576 | 576 | } |
577 | 577 | $i++; |
578 | 578 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | |
597 | 597 | $this->document->setLocation($documentId); |
598 | 598 | } else { |
599 | - $this->logger->error('Invalid location given "' . $documentId . '" for document loading'); |
|
599 | + $this->logger->error('Invalid location given "'.$documentId.'" for document loading'); |
|
600 | 600 | } |
601 | 601 | |
602 | 602 | return $doc; |
@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | ) { |
126 | 126 | // Get current configuration. |
127 | 127 | $result = $queryBuilder |
128 | - ->select($table . '.is_listed AS is_listed') |
|
128 | + ->select($table.'.is_listed AS is_listed') |
|
129 | 129 | ->from($table) |
130 | 130 | ->where( |
131 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), |
|
131 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), |
|
132 | 132 | Helper::whereExpression($table) |
133 | 133 | ) |
134 | 134 | ->setMaxResults(1) |
@@ -151,10 +151,10 @@ discard block |
||
151 | 151 | ) { |
152 | 152 | // Get current configuration. |
153 | 153 | $result = $queryBuilder |
154 | - ->select($table . '.index_autocomplete AS index_autocomplete') |
|
154 | + ->select($table.'.index_autocomplete AS index_autocomplete') |
|
155 | 155 | ->from($table) |
156 | 156 | ->where( |
157 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), |
|
157 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), |
|
158 | 158 | Helper::whereExpression($table) |
159 | 159 | ) |
160 | 160 | ->setMaxResults(1) |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | if ($solr->ready) { |
325 | 325 | // Delete Solr document. |
326 | 326 | $updateQuery = $solr->service->createUpdate(); |
327 | - $updateQuery->addDeleteQuery('uid:' . (int) $id); |
|
327 | + $updateQuery->addDeleteQuery('uid:'.(int) $id); |
|
328 | 328 | $updateQuery->addCommit(false); |
329 | 329 | $solr->service->update($updateQuery); |
330 | 330 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $document->setCurrentDocument($doc); |
349 | 349 | Indexer::add($document, $documentRepository); |
350 | 350 | } else { |
351 | - $this->logger->error('Failed to re-index document with UID ' . (string) $id); |
|
351 | + $this->logger->error('Failed to re-index document with UID '.(string) $id); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | try { |
400 | 400 | $response = $solr->service->coreAdmin($query); |
401 | 401 | if ($response->getWasSuccessful() == false) { |
402 | - $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); |
|
402 | + $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr'); |
|
403 | 403 | } |
404 | 404 | } catch (\Exception $e) { |
405 | 405 | $this->logger->warning($e->getMessage()); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function validate($value): Result |
48 | 48 | { |
49 | 49 | if (!$value instanceof $this->valueClassName) { |
50 | - $this->logger->debug('Value must be an instance of ' . $this->valueClassName . '.'); |
|
50 | + $this->logger->debug('Value must be an instance of '.$this->valueClassName.'.'); |
|
51 | 51 | throw new InvalidArgumentException('Type of value is not valid.', 1723126505626); |
52 | 52 | } |
53 | 53 | return parent::validate($value); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | // extract collection(s) from collection parameter |
84 | 84 | $collections = []; |
85 | 85 | if (is_array($this->searchParams) && array_key_exists('collection', $this->searchParams)) { |
86 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
86 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
87 | 87 | if (!empty($collectionEntry)) { |
88 | 88 | $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry); |
89 | 89 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $simplePagination = new SimplePagination($solrPaginator); |
117 | 117 | |
118 | 118 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
119 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
119 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | $this->view->assign('viewData', $this->viewData); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $pageGridPagination = new PageGridPagination($pageGridPaginator); |
67 | 67 | |
68 | 68 | $pagination = $this->buildSimplePagination($pageGridPagination, $pageGridPaginator); |
69 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $pageGridPaginator ]); |
|
69 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $pageGridPaginator]); |
|
70 | 70 | |
71 | 71 | $this->view->assign('docUid', $this->requestData['id']); |
72 | 72 |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | if (empty(array_filter($metadata))) { |
134 | - $this->logger->warning('No metadata found for document with UID ' . $this->document->getUid()); |
|
134 | + $this->logger->warning('No metadata found for document with UID '.$this->document->getUid()); |
|
135 | 135 | return $this->htmlResponse(); |
136 | 136 | } |
137 | 137 | ksort($metadata); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $this->parseMetadata($i, $name, $value, $metadata); |
185 | 185 | |
186 | 186 | if (is_array($metadata[$i][$name])) { |
187 | - $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function ($metadataValue) { |
|
187 | + $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function($metadataValue) { |
|
188 | 188 | return !empty($metadataValue); |
189 | 189 | })); |
190 | 190 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | if (empty(implode('', $value)) && $this->settings['getTitle'] && $this->document->getPartof()) { |
402 | 402 | $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), true); |
403 | 403 | if (!empty($superiorTitle)) { |
404 | - $metadata[$i]['title'] = ['[' . $superiorTitle . ']']; |
|
404 | + $metadata[$i]['title'] = ['['.$superiorTitle.']']; |
|
405 | 405 | } |
406 | 406 | } |
407 | 407 | } |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | $this->view->assign('calendarData', $calendarData); |
137 | 137 | $this->view->assign('documentId', $this->document->getUid()); |
138 | 138 | $this->view->assign('yearLinkTitle', $yearLinkTitle); |
139 | - $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
140 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
139 | + $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getCurrentDocument()->tableOfContents[0]['points']); |
|
140 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
141 | 141 | |
142 | 142 | return $this->htmlResponse(); |
143 | 143 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | $this->view->assign('documentId', $this->document->getUid()); |
227 | - $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
227 | + $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); |
|
228 | 228 | |
229 | 229 | return $this->htmlResponse(); |
230 | 230 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | protected function getCalendarYear(array &$calendarData, array $calendarIssuesByMonth, int $year, int $firstMonth = 1, int $lastMonth = 12): void |
246 | 246 | { |
247 | 247 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
248 | - $key = $year . '-' . $i; |
|
248 | + $key = $year.'-'.$i; |
|
249 | 249 | |
250 | 250 | $calendarData[$key] = [ |
251 | 251 | 'DAYMON_NAME' => strftime('%a', strtotime('last Monday')), |
@@ -255,16 +255,16 @@ discard block |
||
255 | 255 | 'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')), |
256 | 256 | 'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')), |
257 | 257 | 'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')), |
258 | - 'MONTHNAME' => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, |
|
258 | + 'MONTHNAME' => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year, |
|
259 | 259 | 'CALYEAR' => ($i == $firstMonth) ? $year : '' |
260 | 260 | ]; |
261 | 261 | |
262 | - $firstOfMonth = strtotime($year . '-' . $i . '-1'); |
|
262 | + $firstOfMonth = strtotime($year.'-'.$i.'-1'); |
|
263 | 263 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
264 | 264 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
265 | 265 | // There are never more than 6 weeks in a month. |
266 | 266 | for ($j = 0; $j <= 5; $j++) { |
267 | - $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
267 | + $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
268 | 268 | |
269 | 269 | $calendarData[$key]['week'][$j] = [ |
270 | 270 | 'DAYMON' => ['dayValue' => ' '], |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | ]; |
278 | 278 | // Every week has seven days. ;-) |
279 | 279 | for ($k = 0; $k <= 6; $k++) { |
280 | - $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
280 | + $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
281 | 281 | if ( |
282 | 282 | $currentDayTime >= $firstOfMonth |
283 | 283 | && $currentDayTime <= $lastOfMonth |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | */ |
349 | 349 | private function fillCalendar(array &$calendarData, int $currentDayTime, string $dayLinks, array $dayLinkDiv, int $firstDayOfWeek, int $k): void |
350 | 350 | { |
351 | - switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
351 | + switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
352 | 352 | case '0': |
353 | 353 | $this->fillDay($calendarData, $currentDayTime, 'DAYSUN', $dayLinks, $dayLinkDiv); |
354 | 354 | break; |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $_day = date('j', $dateTimestamp); |
453 | 453 | $issuesByYear[$_year][$_month][$_day][] = $issue; |
454 | 454 | } else { |
455 | - $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication'); |
|
455 | + $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication'); |
|
456 | 456 | } |
457 | 457 | } |
458 | 458 | // Sort by years. |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | foreach ($year['children'] as $month) { |
496 | 496 | foreach ($month['children'] as $day) { |
497 | 497 | foreach ($day['children'] as $issue) { |
498 | - $title = $issue['label'] ?: $issue['orderlabel']; |
|
498 | + $title = $issue['label'] ? : $issue['orderlabel']; |
|
499 | 499 | if (strtotime($title) !== false) { |
500 | 500 | $title = strftime('%x', strtotime($title)); |
501 | 501 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | foreach ($this->requestData['selected'] as $docValue) { |
135 | 135 | if ($docValue['id']) { |
136 | 136 | $docData = $this->getDocumentData((int) $docValue['id'], $docValue); |
137 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
137 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
138 | 138 | $this->redirectToUri($pdfUrl); |
139 | 139 | } |
140 | 140 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | if ($allMails->count() > 0) { |
202 | 202 | $mailSelect[0] = htmlspecialchars(LocalizationUtility::translate('basket.chooseMail', 'dlf')); |
203 | 203 | foreach ($allMails as $mail) { |
204 | - $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()) . ' (' . htmlspecialchars($mail->getMail()) . ')'; |
|
204 | + $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()).' ('.htmlspecialchars($mail->getMail()).')'; |
|
205 | 205 | } |
206 | 206 | $this->view->assign('mailSelect', $mailSelect); |
207 | 207 | } |
@@ -290,12 +290,12 @@ discard block |
||
290 | 290 | |
291 | 291 | $docData = $this->getDocumentData((int) $id, $data); |
292 | 292 | |
293 | - $entryKey = $id . '_' . $startPage; |
|
293 | + $entryKey = $id.'_'.$startPage; |
|
294 | 294 | if (!empty($startX)) { |
295 | - $entryKey .= '_' . $startX; |
|
295 | + $entryKey .= '_'.$startX; |
|
296 | 296 | } |
297 | 297 | if (!empty($endX)) { |
298 | - $entryKey .= '_' . $endX; |
|
298 | + $entryKey .= '_'.$endX; |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | $entry = [ |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : (int) $data['endY'], $urlParams); |
355 | 355 | $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : (int) $data['rotation'], $urlParams); |
356 | 356 | |
357 | - $downloadUrl = $this->settings['pdfgenerate'] . $urlParams; |
|
357 | + $downloadUrl = $this->settings['pdfgenerate'].$urlParams; |
|
358 | 358 | |
359 | 359 | $title = $this->document->getTitle(); |
360 | 360 | if (empty($title)) { |
@@ -365,15 +365,15 @@ discard block |
||
365 | 365 | $info = ''; |
366 | 366 | if ($data['startX'] != '' && $data['endX'] != '') { |
367 | 367 | // cutout |
368 | - $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')) . ' '; |
|
368 | + $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')).' '; |
|
369 | 369 | } |
370 | 370 | if ($data['startpage'] == $data['endpage']) { |
371 | 371 | // One page |
372 | - $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage']; |
|
372 | + $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage']; |
|
373 | 373 | } else { |
374 | - $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'] . '-' . $data['endpage']; |
|
374 | + $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'].'-'.$data['endpage']; |
|
375 | 375 | } |
376 | - $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')'; |
|
376 | + $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')'; |
|
377 | 377 | if ($data['startpage'] == $data['endpage']) { |
378 | 378 | $pageNums = 1; |
379 | 379 | } else { |
@@ -446,12 +446,12 @@ discard block |
||
446 | 446 | if ($piVars['addToBasket'] == 'list') { |
447 | 447 | $documentItem['endpage'] = $this->document->getCurrentDocument()->numPages; |
448 | 448 | } |
449 | - $arrayKey = $documentItem['id'] . '_' . $page; |
|
449 | + $arrayKey = $documentItem['id'].'_'.$page; |
|
450 | 450 | if (!empty($documentItem['startX'])) { |
451 | - $arrayKey .= '_' . $documentItem['startX']; |
|
451 | + $arrayKey .= '_'.$documentItem['startX']; |
|
452 | 452 | } |
453 | 453 | if (!empty($documentItem['endX'])) { |
454 | - $arrayKey .= '_' . $documentItem['endX']; |
|
454 | + $arrayKey .= '_'.$documentItem['endX']; |
|
455 | 455 | } |
456 | 456 | // do not add more than one identical object |
457 | 457 | if (!in_array($arrayKey, $items)) { |
@@ -472,14 +472,14 @@ discard block |
||
472 | 472 | // remove parameter endpage |
473 | 473 | $pdfParams = str_replace(",##endpage##", '', $pdfParams); |
474 | 474 | } |
475 | - $pdfGenerateUrl = $this->settings['pdfgenerate'] . $pdfParams; |
|
475 | + $pdfGenerateUrl = $this->settings['pdfgenerate'].$pdfParams; |
|
476 | 476 | if ($this->settings['pregeneration']) { |
477 | 477 | // send ajax request to webapp |
478 | 478 | $output .= ' |
479 | 479 | <script> |
480 | 480 | $(document).ready(function(){ |
481 | 481 | $.ajax({ |
482 | - url: "' . $pdfGenerateUrl . '", |
|
482 | + url: "' . $pdfGenerateUrl.'", |
|
483 | 483 | }).done(function() { |
484 | 484 | }); |
485 | 485 | }); |
@@ -517,12 +517,12 @@ discard block |
||
517 | 517 | } |
518 | 518 | foreach ($piVars['selected'] as $value) { |
519 | 519 | if (isset($value['id'])) { |
520 | - $arrayKey = $value['id'] . '_' . $value['startpage']; |
|
520 | + $arrayKey = $value['id'].'_'.$value['startpage']; |
|
521 | 521 | if (!empty($value['startX'])) { |
522 | - $arrayKey .= '_' . $value['startX']; |
|
522 | + $arrayKey .= '_'.$value['startX']; |
|
523 | 523 | } |
524 | 524 | if (!empty($value['endX'])) { |
525 | - $arrayKey .= '_' . $value['endX']; |
|
525 | + $arrayKey .= '_'.$value['endX']; |
|
526 | 526 | } |
527 | 527 | if (isset($items[$arrayKey])) { |
528 | 528 | unset($items[$arrayKey]); |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | |
556 | 556 | $mailObject = $this->mailRepository->findByUid(intval($mailId))->getFirst(); |
557 | 557 | |
558 | - $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf')) . "\n"; |
|
558 | + $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf'))."\n"; |
|
559 | 559 | $numberOfPages = 0; |
560 | 560 | $pdfUrl = $this->settings['pdfdownload']; |
561 | 561 | // prepare links |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | if ($docValue['id']) { |
564 | 564 | $explodeId = explode("_", $docValue['id']); |
565 | 565 | $docData = $this->getDocumentData((int) $explodeId[0], $docValue); |
566 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
566 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
567 | 567 | $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage']))); |
568 | 568 | if ($pages === 0) { |
569 | 569 | $numberOfPages = $numberOfPages + 1; |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | // Remove leading/tailing pdfparamseperator |
576 | 576 | $pdfUrl = trim($pdfUrl, $this->settings['pdfparamseparator']); |
577 | - $mailBody = $mailText . $pdfUrl; |
|
577 | + $mailBody = $mailText.$pdfUrl; |
|
578 | 578 | // Get hook objects. |
579 | 579 | $hookObjects = Helper::getHookObjects('Classes/Controller/BasketController.php'); |
580 | 580 | // Hook for getting a customized mail body. |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | $newActionLog = GeneralUtility::makeInstance(ActionLog::class); |
602 | 602 | $newActionLog->setFileName($pdfUrl); |
603 | 603 | $newActionLog->setCountPages($numberOfPages); |
604 | - $newActionLog->setLabel('Mail: ' . $mailObject->getMail()); |
|
604 | + $newActionLog->setLabel('Mail: '.$mailObject->getMail()); |
|
605 | 605 | |
606 | 606 | if ($this->isUserLoggedIn()) { |
607 | 607 | // internal user |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | foreach ($this->requestData['selected'] as $docId => $docValue) { |
631 | 631 | if ($docValue['id']) { |
632 | 632 | $docData = $this->getDocumentData((int) $docValue['id'], $docValue); |
633 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
633 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
634 | 634 | $numberOfPages += $docData['pageNums']; |
635 | 635 | } |
636 | 636 | } |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | if ($docValue['id']) { |
649 | 649 | $explodeId = explode("_", $docId); |
650 | 650 | $docData = $this->getDocumentData((int) $explodeId[0], $docValue); |
651 | - $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator']; |
|
651 | + $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator']; |
|
652 | 652 | $numberOfPages += $docData['pageNums']; |
653 | 653 | } |
654 | 654 | } |
@@ -665,12 +665,12 @@ discard block |
||
665 | 665 | // internal user |
666 | 666 | $actionLog->setUserId($GLOBALS["TSFE"]->fe_user->user['uid']); |
667 | 667 | $actionLog->setName($GLOBALS["TSFE"]->fe_user->user['username']); |
668 | - $actionLog->setLabel('Print: ' . $printer->getLabel()); |
|
668 | + $actionLog->setLabel('Print: '.$printer->getLabel()); |
|
669 | 669 | } else { |
670 | 670 | // external user |
671 | 671 | $actionLog->setUserId(0); |
672 | 672 | $actionLog->setName('n/a'); |
673 | - $actionLog->setLabel('Print: ' . $printer->getLabel()); |
|
673 | + $actionLog->setLabel('Print: '.$printer->getLabel()); |
|
674 | 674 | } |
675 | 675 | // add action to protocol |
676 | 676 | $this->actionLogRepository->add($actionLog); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | |
272 | 272 | $data['tx_dlf_metadata'][uniqid('NEW')] = [ |
273 | 273 | 'pid' => $this->pid, |
274 | - 'label' => $this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels), |
|
274 | + 'label' => $this->getLLL('metadata.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels), |
|
275 | 275 | 'index_name' => $indexName, |
276 | 276 | 'format' => implode(',', $formatIds), |
277 | 277 | 'default_value' => $values['default_value'], |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | 'pid' => $this->pid, |
311 | 311 | 'sys_language_uid' => $siteLanguage->getLanguageId(), |
312 | 312 | 'l18n_parent' => $id, |
313 | - 'label' => $this->getLLL('metadata.' . $indexName, $siteLanguage->getTypo3Language(), $metadataLabels), |
|
313 | + 'label' => $this->getLLL('metadata.'.$indexName, $siteLanguage->getTypo3Language(), $metadataLabels), |
|
314 | 314 | ]; |
315 | 315 | } |
316 | 316 | |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | |
337 | 337 | if ($this->solrCoreRepository->findOneByPid($this->pid) === null) { |
338 | 338 | $newRecord = GeneralUtility::makeInstance(SolrCore::class); |
339 | - $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')'); |
|
339 | + $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels).' (PID '.$this->pid.')'); |
|
340 | 340 | $indexName = Solr::createCore(''); |
341 | 341 | if (!empty($indexName)) { |
342 | 342 | $newRecord->setIndexName($indexName); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $data['tx_dlf_structures'][uniqid('NEW')] = [ |
377 | 377 | 'pid' => $this->pid, |
378 | 378 | 'toplevel' => $values['toplevel'], |
379 | - 'label' => $this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structureLabels), |
|
379 | + 'label' => $this->getLLL('structure.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $structureLabels), |
|
380 | 380 | 'index_name' => $indexName, |
381 | 381 | 'oai_name' => $values['oai_name'], |
382 | 382 | 'thumbnail' => 0, |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | 'pid' => $this->pid, |
402 | 402 | 'sys_language_uid' => $siteLanguage->getLanguageId(), |
403 | 403 | 'l18n_parent' => $id, |
404 | - 'label' => $this->getLLL('structure.' . $indexName, $siteLanguage->getTypo3Language(), $structureLabels), |
|
404 | + 'label' => $this->getLLL('structure.'.$indexName, $siteLanguage->getTypo3Language(), $structureLabels), |
|
405 | 405 | ]; |
406 | 406 | } |
407 | 407 | |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | } elseif (isset($langArray['default'][$index][0]['target'])) { |
479 | 479 | return $langArray['default'][$index][0]['target']; |
480 | 480 | } else { |
481 | - return 'Missing translation for ' . $index; |
|
481 | + return 'Missing translation for '.$index; |
|
482 | 482 | } |
483 | 483 | } |
484 | 484 | |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | */ |
494 | 494 | private function getRecords(string $recordType): array |
495 | 495 | { |
496 | - $filePath = GeneralUtility::getFileAbsFileName('EXT:dlf/Resources/Private/Data/' . $recordType . 'Defaults.json'); |
|
496 | + $filePath = GeneralUtility::getFileAbsFileName('EXT:dlf/Resources/Private/Data/'.$recordType.'Defaults.json'); |
|
497 | 497 | if (file_exists($filePath)) { |
498 | 498 | $fileContents = file_get_contents($filePath); |
499 | 499 | $records = json_decode($fileContents, true); |