@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } elseif ($checksum == 10) { |
149 | 149 | //TODO: Binary operation "+" between string and 1 results in an error. |
150 | 150 | // @phpstan-ignore-next-line |
151 | - return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); |
|
151 | + return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD'); |
|
152 | 152 | } elseif (substr($id, -1, 1) != $checksum) { |
153 | 153 | return false; |
154 | 154 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $encrypted = openssl_encrypt($string, self::$cipherAlgorithm, $key, OPENSSL_RAW_DATA, $iv); |
355 | 355 | // Merge initialization vector and encrypted data. |
356 | 356 | if ($encrypted !== false) { |
357 | - $encrypted = base64_encode($iv . $encrypted); |
|
357 | + $encrypted = base64_encode($iv.$encrypted); |
|
358 | 358 | } |
359 | 359 | return $encrypted; |
360 | 360 | } |
@@ -396,8 +396,8 @@ discard block |
||
396 | 396 | public static function getHookObjects(string $scriptRelPath): array |
397 | 397 | { |
398 | 398 | $hookObjects = []; |
399 | - if (is_array(self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'])) { |
|
400 | - foreach (self::getOptions()[self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) { |
|
399 | + if (is_array(self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'])) { |
|
400 | + foreach (self::getOptions()[self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) { |
|
401 | 401 | $hookObjects[] = GeneralUtility::makeInstance($classRef); |
402 | 402 | } |
403 | 403 | } |
@@ -426,12 +426,12 @@ discard block |
||
426 | 426 | // NOTE: Only use tables that don't have too many entries! |
427 | 427 | || !in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_metadatasubentries', 'tx_dlf_structures', 'tx_dlf_solrcores']) |
428 | 428 | ) { |
429 | - self::log('Invalid UID "' . $uid . '" or table "' . $table . '"', LOG_SEVERITY_ERROR); |
|
429 | + self::log('Invalid UID "'.$uid.'" or table "'.$table.'"', LOG_SEVERITY_ERROR); |
|
430 | 430 | return ''; |
431 | 431 | } |
432 | 432 | |
433 | - $makeCacheKey = function ($pid, $uid) { |
|
434 | - return $pid . '.' . $uid; |
|
433 | + $makeCacheKey = function($pid, $uid) { |
|
434 | + return $pid.'.'.$uid; |
|
435 | 435 | }; |
436 | 436 | |
437 | 437 | static $cache = []; |
@@ -441,9 +441,9 @@ discard block |
||
441 | 441 | |
442 | 442 | $result = $queryBuilder |
443 | 443 | ->select( |
444 | - $table . '.index_name AS index_name', |
|
445 | - $table . '.uid AS uid', |
|
446 | - $table . '.pid AS pid', |
|
444 | + $table.'.index_name AS index_name', |
|
445 | + $table.'.uid AS uid', |
|
446 | + $table.'.pid AS pid', |
|
447 | 447 | ) |
448 | 448 | ->from($table) |
449 | 449 | ->execute(); |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | $result = $cache[$table][$cacheKey] ?? ''; |
462 | 462 | |
463 | 463 | if ($result === '') { |
464 | - self::log('No "index_name" with UID ' . $uid . ' and PID ' . $pid . ' found in table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
464 | + self::log('No "index_name" with UID '.$uid.' and PID '.$pid.' found in table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
465 | 465 | } |
466 | 466 | |
467 | 467 | return $result; |
@@ -490,11 +490,11 @@ discard block |
||
490 | 490 | // No ISO code, return unchanged. |
491 | 491 | return $code; |
492 | 492 | } |
493 | - $lang = LocalizationUtility::translate('LLL:' . $file . ':' . $code); |
|
493 | + $lang = LocalizationUtility::translate('LLL:'.$file.':'.$code); |
|
494 | 494 | if (!empty($lang)) { |
495 | 495 | return $lang; |
496 | 496 | } else { |
497 | - self::log('Language code "' . $code . '" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
497 | + self::log('Language code "'.$code.'" not found in ISO-639 table', LOG_SEVERITY_NOTICE); |
|
498 | 498 | return $code; |
499 | 499 | } |
500 | 500 | } |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | // Sanitize input. |
659 | 659 | $pid = max((int) $pid, 0); |
660 | 660 | if (!$pid) { |
661 | - self::log('Invalid PID ' . $pid . ' for translation', LOG_SEVERITY_WARNING); |
|
661 | + self::log('Invalid PID '.$pid.' for translation', LOG_SEVERITY_WARNING); |
|
662 | 662 | return $indexName; |
663 | 663 | } |
664 | 664 | /** @var PageRepository $pageRepository */ |
@@ -681,13 +681,13 @@ discard block |
||
681 | 681 | // First fetch the uid of the received index_name |
682 | 682 | $result = $queryBuilder |
683 | 683 | ->select( |
684 | - $table . '.uid AS uid', |
|
685 | - $table . '.l18n_parent AS l18n_parent' |
|
684 | + $table.'.uid AS uid', |
|
685 | + $table.'.l18n_parent AS l18n_parent' |
|
686 | 686 | ) |
687 | 687 | ->from($table) |
688 | 688 | ->where( |
689 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
690 | - $queryBuilder->expr()->eq($table . '.index_name', $queryBuilder->expr()->literal($indexName)), |
|
689 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
690 | + $queryBuilder->expr()->eq($table.'.index_name', $queryBuilder->expr()->literal($indexName)), |
|
691 | 691 | self::whereExpression($table, true) |
692 | 692 | ) |
693 | 693 | ->setMaxResults(1) |
@@ -698,12 +698,12 @@ discard block |
||
698 | 698 | if ($row) { |
699 | 699 | // Now we use the uid of the l18_parent to fetch the index_name of the translated content element. |
700 | 700 | $result = $queryBuilder |
701 | - ->select($table . '.index_name AS index_name') |
|
701 | + ->select($table.'.index_name AS index_name') |
|
702 | 702 | ->from($table) |
703 | 703 | ->where( |
704 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
705 | - $queryBuilder->expr()->eq($table . '.uid', $row['l18n_parent']), |
|
706 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId), |
|
704 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
705 | + $queryBuilder->expr()->eq($table.'.uid', $row['l18n_parent']), |
|
706 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId), |
|
707 | 707 | self::whereExpression($table, true) |
708 | 708 | ) |
709 | 709 | ->setMaxResults(1) |
@@ -721,14 +721,14 @@ discard block |
||
721 | 721 | if (empty($labels[$table][$pid][$languageContentId][$indexName])) { |
722 | 722 | // Check if this table is allowed for translation. |
723 | 723 | if (in_array($table, ['tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_metadatasubentries', 'tx_dlf_structures'])) { |
724 | - $additionalWhere = $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]); |
|
724 | + $additionalWhere = $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]); |
|
725 | 725 | if ($languageContentId > 0) { |
726 | 726 | $additionalWhere = $queryBuilder->expr()->andX( |
727 | 727 | $queryBuilder->expr()->orX( |
728 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
729 | - $queryBuilder->expr()->eq($table . '.sys_language_uid', (int) $languageContentId) |
|
728 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
729 | + $queryBuilder->expr()->eq($table.'.sys_language_uid', (int) $languageContentId) |
|
730 | 730 | ), |
731 | - $queryBuilder->expr()->eq($table . '.l18n_parent', 0) |
|
731 | + $queryBuilder->expr()->eq($table.'.l18n_parent', 0) |
|
732 | 732 | ); |
733 | 733 | } |
734 | 734 | |
@@ -737,7 +737,7 @@ discard block |
||
737 | 737 | ->select('*') |
738 | 738 | ->from($table) |
739 | 739 | ->where( |
740 | - $queryBuilder->expr()->eq($table . '.pid', $pid), |
|
740 | + $queryBuilder->expr()->eq($table.'.pid', $pid), |
|
741 | 741 | $additionalWhere, |
742 | 742 | self::whereExpression($table, true) |
743 | 743 | ) |
@@ -755,10 +755,10 @@ discard block |
||
755 | 755 | } |
756 | 756 | } |
757 | 757 | } else { |
758 | - self::log('No translation with PID ' . $pid . ' available in table "' . $table . '" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
758 | + self::log('No translation with PID '.$pid.' available in table "'.$table.'" or translation not accessible', LOG_SEVERITY_NOTICE); |
|
759 | 759 | } |
760 | 760 | } else { |
761 | - self::log('No translations available for table "' . $table . '"', LOG_SEVERITY_WARNING); |
|
761 | + self::log('No translations available for table "'.$table.'"', LOG_SEVERITY_WARNING); |
|
762 | 762 | } |
763 | 763 | } |
764 | 764 | |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | return GeneralUtility::makeInstance(ConnectionPool::class) |
805 | 805 | ->getQueryBuilderForTable($table) |
806 | 806 | ->expr() |
807 | - ->eq($table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
807 | + ->eq($table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], 0); |
|
808 | 808 | } else { |
809 | 809 | self::log('Unexpected TYPO3_MODE', LOG_SEVERITY_ERROR); |
810 | 810 | return '1=-1'; |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | try { |
871 | 871 | $response = $requestFactory->request($url, 'GET', $configuration); |
872 | 872 | } catch (\Exception $e) { |
873 | - self::log('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.', LOG_SEVERITY_WARNING); |
|
873 | + self::log('Could not fetch data from URL "'.$url.'". Error: '.$e->getMessage().'.', LOG_SEVERITY_WARNING); |
|
874 | 874 | return false; |
875 | 875 | } |
876 | 876 | return $response->getBody()->getContents(); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | { |
231 | 231 | $file = $this->getFileInfo($id); |
232 | 232 | if ($file['mimeType'] === 'application/vnd.kitodo.iiif') { |
233 | - $file['location'] = (strrpos($file['location'], 'info.json') === strlen($file['location']) - 9) ? $file['location'] : (strrpos($file['location'], '/') === strlen($file['location']) ? $file['location'] . 'info.json' : $file['location'] . '/info.json'); |
|
233 | + $file['location'] = (strrpos($file['location'], 'info.json') === strlen($file['location']) - 9) ? $file['location'] : (strrpos($file['location'], '/') === strlen($file['location']) ? $file['location'].'info.json' : $file['location'].'/info.json'); |
|
234 | 234 | $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif'); |
235 | 235 | IiifHelper::setUrlReader(IiifUrlReader::getInstance()); |
236 | 236 | IiifHelper::setMaxThumbnailHeight($conf['thumbnailHeight']); |
@@ -240,9 +240,9 @@ discard block |
||
240 | 240 | return $service->getImageUrl(); |
241 | 241 | } |
242 | 242 | } elseif ($file['mimeType'] === 'application/vnd.netfpx') { |
243 | - $baseURL = $file['location'] . (strpos($file['location'], '?') === false ? '?' : ''); |
|
243 | + $baseURL = $file['location'].(strpos($file['location'], '?') === false ? '?' : ''); |
|
244 | 244 | // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server' |
245 | - return $baseURL . '&CVT=jpeg'; |
|
245 | + return $baseURL.'&CVT=jpeg'; |
|
246 | 246 | } |
247 | 247 | return $file['location']; |
248 | 248 | } |
@@ -271,14 +271,14 @@ discard block |
||
271 | 271 | */ |
272 | 272 | public function getFileLocation(string $id): string |
273 | 273 | { |
274 | - $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]'); |
|
274 | + $location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]'); |
|
275 | 275 | if ( |
276 | 276 | !empty($id) |
277 | 277 | && !empty($location) |
278 | 278 | ) { |
279 | 279 | return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href; |
280 | 280 | } else { |
281 | - $this->logger->warning('There is no file node with @ID "' . $id . '"'); |
|
281 | + $this->logger->warning('There is no file node with @ID "'.$id.'"'); |
|
282 | 282 | return ''; |
283 | 283 | } |
284 | 284 | } |
@@ -290,9 +290,9 @@ discard block |
||
290 | 290 | { |
291 | 291 | $mets = $this->mets |
292 | 292 | ->xpath( |
293 | - './mets:structMap[@TYPE="PHYSICAL"]' . |
|
294 | - '//mets:div[@ID="' . $pageId . '"]' . |
|
295 | - '/mets:fptr[@FILEID="' . $fileId . '"]' . |
|
293 | + './mets:structMap[@TYPE="PHYSICAL"]'. |
|
294 | + '//mets:div[@ID="'.$pageId.'"]'. |
|
295 | + '/mets:fptr[@FILEID="'.$fileId.'"]'. |
|
296 | 296 | '/mets:area/@BEGIN' |
297 | 297 | ); |
298 | 298 | return empty($mets) ? '' : $mets[0]->__toString(); |
@@ -304,14 +304,14 @@ discard block |
||
304 | 304 | */ |
305 | 305 | public function getFileMimeType(string $id): string |
306 | 306 | { |
307 | - $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE'); |
|
307 | + $mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE'); |
|
308 | 308 | if ( |
309 | 309 | !empty($id) |
310 | 310 | && !empty($mimetype) |
311 | 311 | ) { |
312 | 312 | return (string) $mimetype[0]; |
313 | 313 | } else { |
314 | - $this->logger->warning('There is no file node with @ID "' . $id . '" or no MIME type specified'); |
|
314 | + $this->logger->warning('There is no file node with @ID "'.$id.'" or no MIME type specified'); |
|
315 | 315 | return ''; |
316 | 316 | } |
317 | 317 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | return $this->logicalUnits[$id]; |
332 | 332 | } elseif (!empty($id)) { |
333 | 333 | // Get specified logical unit. |
334 | - $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]'); |
|
334 | + $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]'); |
|
335 | 335 | } else { |
336 | 336 | // Get all logical units at top level. |
337 | 337 | $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div'); |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $cPid = max($cPid, 0); |
547 | 547 | if ($cPid == 0 && ($this->cPid || $this->pid)) { |
548 | 548 | // Retain current PID. |
549 | - $cPid = $this->cPid ?: $this->pid; |
|
549 | + $cPid = $this->cPid ? : $this->pid; |
|
550 | 550 | } |
551 | 551 | return $cPid; |
552 | 552 | } |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | if (isset($this->fileInfos[$id]) || in_array('dmdSec', $metadataSections)) { |
614 | 614 | return $metadata; |
615 | 615 | } else { |
616 | - $this->logger->warning('No supported descriptive metadata found for logical structure with @ID "' . $id . '"'); |
|
616 | + $this->logger->warning('No supported descriptive metadata found for logical structure with @ID "'.$id.'"'); |
|
617 | 617 | return []; |
618 | 618 | } |
619 | 619 | } |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | if (!empty($this->logicalUnits[$id])) { |
693 | 693 | return [$this->logicalUnits[$id]['type']]; |
694 | 694 | } else { |
695 | - $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE'); |
|
695 | + $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE'); |
|
696 | 696 | if (!empty($struct)) { |
697 | 697 | return [(string) $struct[0]]; |
698 | 698 | } |
@@ -849,17 +849,17 @@ discard block |
||
849 | 849 | if ($resArray['format'] > 0 && !empty($resArray['xpath_sorting'])) { |
850 | 850 | $values = $domXPath->evaluate($resArray['xpath_sorting'], $domNode); |
851 | 851 | if ($values instanceof DOMNodeList && $values->length > 0) { |
852 | - $metadata[$indexName . '_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
852 | + $metadata[$indexName.'_sorting'][0] = trim((string) $values->item(0)->nodeValue); |
|
853 | 853 | } elseif (!($values instanceof DOMNodeList)) { |
854 | - $metadata[$indexName . '_sorting'][0] = trim((string) $values); |
|
854 | + $metadata[$indexName.'_sorting'][0] = trim((string) $values); |
|
855 | 855 | } |
856 | 856 | } |
857 | - if (empty($metadata[$indexName . '_sorting'][0])) { |
|
857 | + if (empty($metadata[$indexName.'_sorting'][0])) { |
|
858 | 858 | if (is_array($currentMetadata)) { |
859 | 859 | $sortingValue = implode(',', array_column($currentMetadata, 0)); |
860 | - $metadata[$indexName . '_sorting'][0] = $sortingValue; |
|
860 | + $metadata[$indexName.'_sorting'][0] = $sortingValue; |
|
861 | 861 | } else { |
862 | - $metadata[$indexName . '_sorting'][0] = $currentMetadata; |
|
862 | + $metadata[$indexName.'_sorting'][0] = $currentMetadata; |
|
863 | 863 | } |
864 | 864 | } |
865 | 865 | } |
@@ -920,11 +920,11 @@ discard block |
||
920 | 920 | return true; |
921 | 921 | } |
922 | 922 | } else { |
923 | - $this->logger->warning('Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->mdSec[$dmdId]['type'] . '"'); |
|
923 | + $this->logger->warning('Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->mdSec[$dmdId]['type'].'"'); |
|
924 | 924 | } |
925 | 925 | } |
926 | 926 | } else { |
927 | - $this->logger->notice('Unsupported metadata format "' . $this->mdSec[$dmdId]['type'] . '" in ' . $mdSectionType . ' with @ID "' . $dmdId . '"'); |
|
927 | + $this->logger->notice('Unsupported metadata format "'.$this->mdSec[$dmdId]['type'].'" in '.$mdSectionType.' with @ID "'.$dmdId.'"'); |
|
928 | 928 | } |
929 | 929 | return false; |
930 | 930 | } |
@@ -1077,7 +1077,7 @@ discard block |
||
1077 | 1077 | $dmdIds = $this->logicalUnits[$id]['dmdId'] ?? ''; |
1078 | 1078 | $admIds = $this->logicalUnits[$id]['admId'] ?? ''; |
1079 | 1079 | } else { |
1080 | - $mdSec = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]')[0]; |
|
1080 | + $mdSec = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]')[0]; |
|
1081 | 1081 | if ($mdSec) { |
1082 | 1082 | $dmdIds = (string) $mdSec->attributes()->DMDID; |
1083 | 1083 | $admIds = (string) $mdSec->attributes()->ADMID; |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | |
1108 | 1108 | return array_filter( |
1109 | 1109 | $allMdIds, |
1110 | - function ($element) { |
|
1110 | + function($element) { |
|
1111 | 1111 | return !empty($element); |
1112 | 1112 | } |
1113 | 1113 | ); |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | */ |
1134 | 1134 | public function getStructureDepth(string $logId) |
1135 | 1135 | { |
1136 | - $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*'); |
|
1136 | + $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*'); |
|
1137 | 1137 | if (!empty($ancestors)) { |
1138 | 1138 | return count($ancestors); |
1139 | 1139 | } else { |
@@ -1157,9 +1157,9 @@ discard block |
||
1157 | 1157 | $this->registerNamespaces($this->mets); |
1158 | 1158 | } else { |
1159 | 1159 | if (!empty($location)) { |
1160 | - $this->logger->error('No METS part found in document with location "' . $location . '".'); |
|
1160 | + $this->logger->error('No METS part found in document with location "'.$location.'".'); |
|
1161 | 1161 | } elseif (!empty($this->recordId)) { |
1162 | - $this->logger->error('No METS part found in document with recordId "' . $this->recordId . '".'); |
|
1162 | + $this->logger->error('No METS part found in document with recordId "'.$this->recordId.'".'); |
|
1163 | 1163 | } else { |
1164 | 1164 | $this->logger->error('No METS part found in current document.'); |
1165 | 1165 | } |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | return true; |
1181 | 1181 | } |
1182 | 1182 | } |
1183 | - $this->logger->error('Could not load XML file from "' . $location . '"'); |
|
1183 | + $this->logger->error('Could not load XML file from "'.$location.'"'); |
|
1184 | 1184 | return false; |
1185 | 1185 | } |
1186 | 1186 | |
@@ -1303,10 +1303,10 @@ discard block |
||
1303 | 1303 | |
1304 | 1304 | if (!empty($mdType) && !empty($this->formats[(string) $mdType[0]])) { |
1305 | 1305 | $type = (string) $mdType[0]; |
1306 | - $xml = $element->xpath('./mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); |
|
1306 | + $xml = $element->xpath('./mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); |
|
1307 | 1307 | } elseif (!empty($otherMdType) && !empty($this->formats[(string) $otherMdType[0]])) { |
1308 | 1308 | $type = (string) $otherMdType[0]; |
1309 | - $xml = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); |
|
1309 | + $xml = $element->xpath('./mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); |
|
1310 | 1310 | } |
1311 | 1311 | |
1312 | 1312 | if (empty($xml)) { |
@@ -1513,7 +1513,7 @@ discard block |
||
1513 | 1513 | // Get track info wtih begin end extent time for later assignment with musical |
1514 | 1514 | if ((string) $elementNode['TYPE'] === 'track') { |
1515 | 1515 | foreach ($elementNode->children('http://www.loc.gov/METS/')->fptr as $fptr) { |
1516 | - if (isset($fptr->area) && ((string) $fptr->area->attributes()->BETYPE === 'TIME')) { |
|
1516 | + if (isset($fptr->area) && ((string) $fptr->area->attributes()->BETYPE === 'TIME')) { |
|
1517 | 1517 | // Check if file has valid @USE attribute. |
1518 | 1518 | if (!empty($fileUse[(string) $fptr->area->attributes()->FILEID])) { |
1519 | 1519 | $this->physicalStructureInfo[$elements[(int) $elementNode['ORDER']]]['tracks'][$fileUse[(string) $fptr->area->attributes()->FILEID]] = [ |
@@ -1567,9 +1567,9 @@ discard block |
||
1567 | 1567 | || $forceReload |
1568 | 1568 | ) { |
1569 | 1569 | // Retain current PID. |
1570 | - $cPid = $this->cPid ?: $this->pid; |
|
1570 | + $cPid = $this->cPid ? : $this->pid; |
|
1571 | 1571 | if (!$cPid) { |
1572 | - $this->logger->error('Invalid PID ' . $cPid . ' for structure definitions'); |
|
1572 | + $this->logger->error('Invalid PID '.$cPid.' for structure definitions'); |
|
1573 | 1573 | $this->thumbnailLoaded = true; |
1574 | 1574 | return $this->thumbnail; |
1575 | 1575 | } |
@@ -1606,7 +1606,7 @@ discard block |
||
1606 | 1606 | if (!empty($resArray['thumbnail'])) { |
1607 | 1607 | $strctType = Helper::getIndexNameFromUid($resArray['thumbnail'], 'tx_dlf_structures', $cPid); |
1608 | 1608 | // Check if this document has a structure element of the desired type. |
1609 | - $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID'); |
|
1609 | + $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID'); |
|
1610 | 1610 | if (!empty($strctIds)) { |
1611 | 1611 | $strctId = (string) $strctIds[0]; |
1612 | 1612 | } |
@@ -1629,7 +1629,7 @@ discard block |
||
1629 | 1629 | } |
1630 | 1630 | } |
1631 | 1631 | } else { |
1632 | - $this->logger->error('No structure of type "' . $metadata['type'][0] . '" found in database'); |
|
1632 | + $this->logger->error('No structure of type "'.$metadata['type'][0].'" found in database'); |
|
1633 | 1633 | } |
1634 | 1634 | $this->thumbnailLoaded = true; |
1635 | 1635 | } |
@@ -1675,7 +1675,7 @@ discard block |
||
1675 | 1675 | { |
1676 | 1676 | if (empty($this->parentHref)) { |
1677 | 1677 | // Get the closest ancestor of the current document which has a MPTR child. |
1678 | - $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $this->toplevelId . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
1678 | + $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->toplevelId.'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
|
1679 | 1679 | if (!empty($parentMptr)) { |
1680 | 1680 | $this->parentHref = (string) $parentMptr[0]->attributes('http://www.w3.org/1999/xlink')->href; |
1681 | 1681 | } |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | ]; |
109 | 109 | } else { |
110 | 110 | $this->logger->warning( |
111 | - ' No target pages found! Annotation: "' . $annotation->getId() . '", ' |
|
112 | - . 'Target: "' . $annotationTarget->getUrl() . '"' |
|
111 | + ' No target pages found! Annotation: "'.$annotation->getId().'", ' |
|
112 | + . 'Target: "'.$annotationTarget->getUrl().'"' |
|
113 | 113 | ); |
114 | 114 | } |
115 | 115 | } |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | ]; |
126 | 126 | } else { |
127 | 127 | $this->logger->warning( |
128 | - ' No target pages found! Annotation: "' . $annotation->getId() . '", ' |
|
129 | - . 'Target: "' . $annotationTarget->getUrl() . '"' |
|
128 | + ' No target pages found! Annotation: "'.$annotation->getId().'", ' |
|
129 | + . 'Target: "'.$annotationTarget->getUrl().'"' |
|
130 | 130 | ); |
131 | 131 | } |
132 | 132 | } elseif ($annotationTarget->getObjectId()) { |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | $this->logger->warning( |
148 | - ' No target pages found! Annotation: "' . $annotation->getId() . '", ' |
|
149 | - . 'Target: "' . $annotationTarget->getUrl() . '"' |
|
148 | + ' No target pages found! Annotation: "'.$annotation->getId().'", ' |
|
149 | + . 'Target: "'.$annotationTarget->getUrl().'"' |
|
150 | 150 | ); |
151 | 151 | } |
152 | 152 | } else { |
153 | 153 | $this->logger->warning( |
154 | - 'Invalid target! Annotation: "' . $annotation->getId() . '", ' |
|
155 | - . 'Target: "' . $annotationTarget->getUrl() . '"' |
|
154 | + 'Invalid target! Annotation: "'.$annotation->getId().'", ' |
|
155 | + . 'Target: "'.$annotationTarget->getUrl().'"' |
|
156 | 156 | ); |
157 | 157 | } |
158 | 158 | } |
@@ -267,10 +267,10 @@ discard block |
||
267 | 267 | $intervalTo = \DateTime::createFromFormat('U.u', $to); |
268 | 268 | } |
269 | 269 | foreach ($tracks as $index => $track) { |
270 | - $begin = new DateTime("1970-01-01 " . $track['begin']); |
|
271 | - $extent = new DateTime("1970-01-01 " . $track['extent']); |
|
270 | + $begin = new DateTime("1970-01-01 ".$track['begin']); |
|
271 | + $extent = new DateTime("1970-01-01 ".$track['extent']); |
|
272 | 272 | $diff = (new DateTime("1970-01-01 00:00:00"))->diff($extent); |
273 | - $end = (new DateTime("1970-01-01 " . $track['begin']))->add($diff); |
|
273 | + $end = (new DateTime("1970-01-01 ".$track['begin']))->add($diff); |
|
274 | 274 | if ( |
275 | 275 | !( |
276 | 276 | $intervalFrom < $end && ( |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | if ($this->document) { |
180 | 180 | $doc = AbstractDocument::getInstance($this->document->getLocation(), ['storagePid' => $pid], true); |
181 | 181 | } else { |
182 | - $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $pid . '" for document loading'); |
|
182 | + $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$pid.'" for document loading'); |
|
183 | 183 | } |
184 | 184 | } elseif (GeneralUtility::isValidUrl($requestData['id'])) { |
185 | 185 | $doc = AbstractDocument::getInstance($requestData['id'], ['storagePid' => $pid], true); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | $this->document->setLocation($requestData['id']); |
195 | 195 | } else { |
196 | - $this->logger->error('Invalid location given "' . $requestData['id'] . '" for document loading'); |
|
196 | + $this->logger->error('Invalid location given "'.$requestData['id'].'" for document loading'); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | if ($this->document !== null && $doc !== null) { |
@@ -206,11 +206,11 @@ discard block |
||
206 | 206 | if ($doc !== null) { |
207 | 207 | $this->document->setCurrentDocument($doc); |
208 | 208 | } else { |
209 | - $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"'); |
|
209 | + $this->logger->error('Failed to load document with record ID "'.$requestData['recordId'].'"'); |
|
210 | 210 | } |
211 | 211 | } |
212 | 212 | } else { |
213 | - $this->logger->error('Empty UID or invalid PID "' . $pid . '" for document loading'); |
|
213 | + $this->logger->error('Empty UID or invalid PID "'.$pid.'" for document loading'); |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | if (!empty($model)) { |
70 | - $embedded3dViewerUrl .= '&model=' . $model; |
|
70 | + $embedded3dViewerUrl .= '&model='.$model; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | if (!empty($this->requestData['viewer'])) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | if (!empty($viewer)) { |
80 | - $embedded3dViewerUrl .= '&viewer=' . $viewer; |
|
80 | + $embedded3dViewerUrl .= '&viewer='.$viewer; |
|
81 | 81 | } |
82 | 82 | return $embedded3dViewerUrl; |
83 | 83 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $modelInfo = PathUtility::pathinfo($parameters['model']); |
70 | 70 | $modelFormat = $modelInfo["extension"]; |
71 | 71 | if (empty($modelFormat)) { |
72 | - return $this->warningResponse('Model path "' . $parameters['model'] . '" has no extension format', $request); |
|
72 | + return $this->warningResponse('Model path "'.$parameters['model'].'" has no extension format', $request); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | if (empty($parameters['viewer'])) { |
@@ -88,30 +88,30 @@ discard block |
||
88 | 88 | $defaultStorage = $storageRepository->getDefaultStorage(); |
89 | 89 | |
90 | 90 | if (!$defaultStorage->hasFolder(self::VIEWER_FOLDER)) { |
91 | - return $this->errorResponse('Required folder "' . self::VIEWER_FOLDER . '" was not found in the default storage "' . $defaultStorage->getName() . '"', $request); |
|
91 | + return $this->errorResponse('Required folder "'.self::VIEWER_FOLDER.'" was not found in the default storage "'.$defaultStorage->getName().'"', $request); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $viewerModules = $defaultStorage->getFolder(self::VIEWER_FOLDER); |
95 | 95 | if (!$viewerModules->hasFolder($viewer)) { |
96 | - return $this->errorResponse('Viewer folder "' . $viewer . '" was not found under the folder "' . self::VIEWER_FOLDER . '"', $request); |
|
96 | + return $this->errorResponse('Viewer folder "'.$viewer.'" was not found under the folder "'.self::VIEWER_FOLDER.'"', $request); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $viewerFolder = $viewerModules->getSubfolder($viewer); |
100 | 100 | if (!$viewerFolder->hasFile(self::VIEWER_CONFIG_YML)) { |
101 | - return $this->errorResponse('Viewer folder "' . $viewer . '" does not contain a file named "' . self::VIEWER_CONFIG_YML . '"', $request); |
|
101 | + return $this->errorResponse('Viewer folder "'.$viewer.'" does not contain a file named "'.self::VIEWER_CONFIG_YML.'"', $request); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** @var YamlFileLoader $yamlFileLoader */ |
105 | 105 | $yamlFileLoader = GeneralUtility::makeInstance(YamlFileLoader::class); |
106 | - $viewerConfigPath = $defaultStorage->getName() . "/" . self::VIEWER_FOLDER . "/" . $viewer . "/"; |
|
107 | - $config = $yamlFileLoader->load($viewerConfigPath . self::VIEWER_CONFIG_YML)["viewer"]; |
|
106 | + $viewerConfigPath = $defaultStorage->getName()."/".self::VIEWER_FOLDER."/".$viewer."/"; |
|
107 | + $config = $yamlFileLoader->load($viewerConfigPath.self::VIEWER_CONFIG_YML)["viewer"]; |
|
108 | 108 | |
109 | 109 | if (!isset($config["supportedModelFormats"]) || empty($config["supportedModelFormats"])) { |
110 | - return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "' . self::VIEWER_CONFIG_YML . '" of viewer "' . $viewer . '" or has no value', $request); |
|
110 | + return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "'.self::VIEWER_CONFIG_YML.'" of viewer "'.$viewer.'" or has no value', $request); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === false) { |
114 | - return $this->warningResponse('Viewer "' . $viewer . '" does not support the model format "' . $modelFormat . '"', $request); |
|
114 | + return $this->warningResponse('Viewer "'.$viewer.'" does not support the model format "'.$modelFormat.'"', $request); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $html = $this->getViewerHtml($config, $viewerConfigPath, $viewerFolder, $parameters['model'], $modelInfo); |
@@ -16,67 +16,67 @@ |
||
16 | 16 | // Plugin "audioplayer". |
17 | 17 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_audioplayer'] = 'layout,select_key,pages,recursive'; |
18 | 18 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_audioplayer'] = 'pi_flexform'; |
19 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/AudioPlayer.xml'); |
|
19 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:'.'dlf/Configuration/FlexForms/AudioPlayer.xml'); |
|
20 | 20 | // Plugin "basket". |
21 | 21 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_basket'] = 'layout,select_key,pages,recursive'; |
22 | 22 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_basket'] = 'pi_flexform'; |
23 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Basket.xml'); |
|
23 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Basket.xml'); |
|
24 | 24 | // Plugin "calendar". |
25 | 25 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_calendar'] = 'layout,select_key,pages,recursive'; |
26 | 26 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_calendar'] = 'pi_flexform'; |
27 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Calendar.xml'); |
|
27 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Calendar.xml'); |
|
28 | 28 | // Plugin "collection". |
29 | 29 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_collection'] = 'layout,select_key,pages,recursive'; |
30 | 30 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_collection'] = 'pi_flexform'; |
31 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Collection.xml'); |
|
31 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Collection.xml'); |
|
32 | 32 | // Plugin "feeds". |
33 | 33 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_feeds'] = 'layout,select_key,pages,recursive'; |
34 | 34 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_feeds'] = 'pi_flexform'; |
35 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Feeds.xml'); |
|
35 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Feeds.xml'); |
|
36 | 36 | // Plugin "listview". |
37 | 37 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_listview'] = 'layout,select_key,pages,recursive'; |
38 | 38 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_listview'] = 'pi_flexform'; |
39 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/ListView.xml'); |
|
39 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:'.'dlf/Configuration/FlexForms/ListView.xml'); |
|
40 | 40 | // Plugin "metadata". |
41 | 41 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_metadata'] = 'layout,select_key,pages,recursive'; |
42 | 42 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_metadata'] = 'pi_flexform'; |
43 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Metadata.xml'); |
|
43 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Metadata.xml'); |
|
44 | 44 | // Plugin "navigation". |
45 | 45 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_navigation'] = 'layout,select_key,pages,recursive'; |
46 | 46 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_navigation'] = 'pi_flexform'; |
47 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Navigation.xml'); |
|
47 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Navigation.xml'); |
|
48 | 48 | // Plugin "oaipmh". |
49 | 49 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_oaipmh'] = 'layout,select_key,pages,recursive'; |
50 | 50 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_oaipmh'] = 'pi_flexform'; |
51 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/OaiPmh.xml'); |
|
51 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:'.'dlf/Configuration/FlexForms/OaiPmh.xml'); |
|
52 | 52 | // Plugin "pagegrid". |
53 | 53 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pagegrid'] = 'layout,select_key,pages,recursive'; |
54 | 54 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pagegrid'] = 'pi_flexform'; |
55 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/PageGrid.xml'); |
|
55 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:'.'dlf/Configuration/FlexForms/PageGrid.xml'); |
|
56 | 56 | // Plugin "pageview". |
57 | 57 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pageview'] = 'layout,select_key,pages,recursive'; |
58 | 58 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pageview'] = 'pi_flexform'; |
59 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/PageView.xml'); |
|
59 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:'.'dlf/Configuration/FlexForms/PageView.xml'); |
|
60 | 60 | // Plugin "search". |
61 | 61 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_search'] = 'layout,select_key,pages,recursive'; |
62 | 62 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_search'] = 'pi_flexform'; |
63 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Search.xml'); |
|
63 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Search.xml'); |
|
64 | 64 | // Plugin "statistics". |
65 | 65 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_statistics'] = 'layout,select_key,pages,recursive'; |
66 | 66 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_statistics'] = 'pi_flexform'; |
67 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Statistics.xml'); |
|
67 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Statistics.xml'); |
|
68 | 68 | // Plugin "tableofcontents". |
69 | 69 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_tableofcontents'] = 'layout,select_key,pages,recursive'; |
70 | 70 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_tableofcontents'] = 'pi_flexform'; |
71 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/TableOfContents.xml'); |
|
71 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:'.'dlf/Configuration/FlexForms/TableOfContents.xml'); |
|
72 | 72 | // Plugin "toolbox". |
73 | 73 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_toolbox'] = 'layout,select_key,pages,recursive'; |
74 | 74 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_toolbox'] = 'pi_flexform'; |
75 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Toolbox.xml'); |
|
75 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Toolbox.xml'); |
|
76 | 76 | // Plugin "embedded3dviewer". |
77 | 77 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_embedded3dviewer'] = 'layout,select_key,pages,recursive'; |
78 | 78 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_embedded3dviewer'] = 'pi_flexform'; |
79 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_embedded3dviewer', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Embedded3dViewer.xml'); |
|
79 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_embedded3dviewer', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Embedded3dViewer.xml'); |
|
80 | 80 | |
81 | 81 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
82 | 82 | 'Dlf', |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $parent->setCurrentDocument($doc); |
115 | 115 | $success = self::add($parent, $documentRepository); |
116 | 116 | } else { |
117 | - Helper::log('Could not load parent document with UID ' . $document->getCurrentDocument()->parentId, LOG_SEVERITY_ERROR); |
|
117 | + Helper::log('Could not load parent document with UID '.$document->getCurrentDocument()->parentId, LOG_SEVERITY_ERROR); |
|
118 | 118 | return false; |
119 | 119 | } |
120 | 120 | } |
@@ -200,19 +200,19 @@ discard block |
||
200 | 200 | } catch (\Exception $e) { |
201 | 201 | if (!(Environment::isCli())) { |
202 | 202 | Helper::addMessage( |
203 | - Helper::getLanguageService()->getLL('flash.solrException') . ' ' . htmlspecialchars($e->getMessage()), |
|
203 | + Helper::getLanguageService()->getLL('flash.solrException').' '.htmlspecialchars($e->getMessage()), |
|
204 | 204 | Helper::getLanguageService()->getLL('flash.error'), |
205 | 205 | FlashMessage::ERROR, |
206 | 206 | true, |
207 | 207 | 'core.template.flashMessages' |
208 | 208 | ); |
209 | 209 | } |
210 | - Helper::log('Apache Solr threw exception: "' . $e->getMessage() . '"', LOG_SEVERITY_ERROR); |
|
210 | + Helper::log('Apache Solr threw exception: "'.$e->getMessage().'"', LOG_SEVERITY_ERROR); |
|
211 | 211 | return false; |
212 | 212 | } |
213 | 213 | } |
214 | 214 | |
215 | - Helper::log('Document not deleted from SOLR - problem with the connection to the SOLR core ' . $solrCoreUid, LOG_SEVERITY_ERROR); |
|
215 | + Helper::log('Document not deleted from SOLR - problem with the connection to the SOLR core '.$solrCoreUid, LOG_SEVERITY_ERROR); |
|
216 | 216 | return false; |
217 | 217 | } |
218 | 218 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | // Sanitize input. |
234 | 234 | $pid = max((int) $pid, 0); |
235 | 235 | if (!$pid) { |
236 | - Helper::log('Invalid PID ' . $pid . ' for metadata configuration', LOG_SEVERITY_ERROR); |
|
236 | + Helper::log('Invalid PID '.$pid.' for metadata configuration', LOG_SEVERITY_ERROR); |
|
237 | 237 | return ''; |
238 | 238 | } |
239 | 239 | // Load metadata configuration. |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $suffix = (in_array($indexName, self::$fields['tokenized']) ? 't' : 'u'); |
243 | 243 | $suffix .= (in_array($indexName, self::$fields['stored']) ? 's' : 'u'); |
244 | 244 | $suffix .= (in_array($indexName, self::$fields['indexed']) ? 'i' : 'u'); |
245 | - $indexName .= '_' . $suffix; |
|
245 | + $indexName .= '_'.$suffix; |
|
246 | 246 | return $indexName; |
247 | 247 | } |
248 | 248 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $solrDoc->setField('title', $metadata['title'][0]); |
359 | 359 | $solrDoc->setField('volume', $metadata['volume'][0]); |
360 | 360 | // verify date formatting |
361 | - if(strtotime($metadata['date'][0])) { |
|
361 | + if (strtotime($metadata['date'][0])) { |
|
362 | 362 | $solrDoc->setField('date', self::getFormattedDate($metadata['date'][0])); |
363 | 363 | } |
364 | 364 | $solrDoc->setField('record_id', $metadata['record_id'][0]); |
@@ -522,11 +522,11 @@ discard block |
||
522 | 522 | $solrDoc->setField(self::getIndexFieldName($indexName, $document->getPid()), $data); |
523 | 523 | if (in_array($indexName, self::$fields['sortables'])) { |
524 | 524 | // Add sortable fields to index. |
525 | - $solrDoc->setField($indexName . '_sorting', $metadata[$indexName . '_sorting'][0]); |
|
525 | + $solrDoc->setField($indexName.'_sorting', $metadata[$indexName.'_sorting'][0]); |
|
526 | 526 | } |
527 | 527 | if (in_array($indexName, self::$fields['facets'])) { |
528 | 528 | // Add facets to index. |
529 | - $solrDoc->setField($indexName . '_faceting', $data); |
|
529 | + $solrDoc->setField($indexName.'_faceting', $data); |
|
530 | 530 | } |
531 | 531 | if (in_array($indexName, self::$fields['autocomplete'])) { |
532 | 532 | $autocomplete = array_merge($autocomplete, $data); |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | $data = self::removeAppendsFromAuthor($data); |
564 | 564 | } |
565 | 565 | // Add facets to index. |
566 | - $solrDoc->setField($indexName . '_faceting', $data); |
|
566 | + $solrDoc->setField($indexName.'_faceting', $data); |
|
567 | 567 | } |
568 | 568 | } |
569 | 569 | // Add sorting information to physical sub-elements if applicable. |
@@ -594,9 +594,9 @@ discard block |
||
594 | 594 | $update = self::$solr->service->createUpdate(); |
595 | 595 | $query = ""; |
596 | 596 | if ($field == 'uid' || $field == 'partof') { |
597 | - $query = $field . ':' . $value; |
|
597 | + $query = $field.':'.$value; |
|
598 | 598 | } else { |
599 | - $query = $field . ':"' . $value . '"'; |
|
599 | + $query = $field.':"'.$value.'"'; |
|
600 | 600 | } |
601 | 601 | $update->addDeleteQuery($query); |
602 | 602 | $update->addCommit($softCommit); |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | { |
622 | 622 | $solrDoc = $updateQuery->createDocument(); |
623 | 623 | // Create unique identifier from document's UID and unit's XML ID. |
624 | - $solrDoc->setField('id', $document->getUid() . $unit['id']); |
|
624 | + $solrDoc->setField('id', $document->getUid().$unit['id']); |
|
625 | 625 | $solrDoc->setField('uid', $document->getUid()); |
626 | 626 | $solrDoc->setField('pid', $document->getPid()); |
627 | 627 | $solrDoc->setField('partof', $document->getPartof()); |
@@ -700,9 +700,9 @@ discard block |
||
700 | 700 | private static function handleException(string $errorMessage): void |
701 | 701 | { |
702 | 702 | if (!(Environment::isCli())) { |
703 | - self::addErrorMessage(Helper::getLanguageService()->getLL('flash.solrException') . '<br />' . htmlspecialchars($errorMessage)); |
|
703 | + self::addErrorMessage(Helper::getLanguageService()->getLL('flash.solrException').'<br />'.htmlspecialchars($errorMessage)); |
|
704 | 704 | } |
705 | - Helper::log('Apache Solr threw exception: "' . $errorMessage . '"', LOG_SEVERITY_ERROR); |
|
705 | + Helper::log('Apache Solr threw exception: "'.$errorMessage.'"', LOG_SEVERITY_ERROR); |
|
706 | 706 | } |
707 | 707 | |
708 | 708 | /** |
@@ -91,12 +91,12 @@ |
||
91 | 91 | $solr = Solr::getInstance($input->getOption('solr')); |
92 | 92 | // Connect to Solr server. |
93 | 93 | if (!$solr->ready) { |
94 | - $io->error('ERROR: Connection to Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
94 | + $io->error('ERROR: Connection to Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
95 | 95 | return BaseCommand::FAILURE; |
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!$solr->optimize($input->getOption('commit'), $input->getOption('optimize'))) { |
99 | - $io->error('ERROR: Optimizing the Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
99 | + $io->error('ERROR: Optimizing the Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
100 | 100 | return BaseCommand::FAILURE; |
101 | 101 | } |
102 | 102 |