@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | foreach ($this->requiredMetadataFields as $requiredMetadataField) { |
| 84 | 84 | if (empty($this->metadata[$requiredMetadataField][0])) { |
| 85 | - $this->logger->error('Missing required metadata field "' . $requiredMetadataField . '".'); |
|
| 85 | + $this->logger->error('Missing required metadata field "'.$requiredMetadataField.'".'); |
|
| 86 | 86 | return false; |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -100,14 +100,14 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function hasCorrectLogicalStructure(string $type): bool |
| 102 | 102 | { |
| 103 | - $expectedNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div[@TYPE="' . $type . '"]'); |
|
| 103 | + $expectedNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div[@TYPE="'.$type.'"]'); |
|
| 104 | 104 | if ($expectedNodes) { |
| 105 | 105 | return true; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | $existingNodes = $this->xml->xpath('./mets:structMap[@TYPE="LOGICAL"]/mets:div'); |
| 109 | 109 | if ($existingNodes) { |
| 110 | - $this->logger->error('Document contains logical structure but @TYPE="' . $type . '" is missing.'); |
|
| 110 | + $this->logger->error('Document contains logical structure but @TYPE="'.$type.'" is missing.'); |
|
| 111 | 111 | return false; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | |
| 106 | 106 | private function getXml(string $file): SimpleXMLElement |
| 107 | 107 | { |
| 108 | - $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/MetsDocument/' . $file); |
|
| 108 | + $xml = simplexml_load_file(__DIR__.'/../../Fixtures/MetsDocument/'.$file); |
|
| 109 | 109 | self::assertNotFalse($xml); |
| 110 | 110 | return $xml; |
| 111 | 111 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->initializeRepositories((int) $input->getOption('pid')); |
| 85 | 85 | |
| 86 | 86 | if ($this->storagePid == 0) { |
| 87 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
| 87 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
| 88 | 88 | return BaseCommand::FAILURE; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -99,13 +99,13 @@ discard block |
||
| 99 | 99 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
| 100 | 100 | $outputSolrCores = []; |
| 101 | 101 | foreach ($allSolrCores as $indexName => $uid) { |
| 102 | - $outputSolrCores[] = $uid . ' : ' . $indexName; |
|
| 102 | + $outputSolrCores[] = $uid.' : '.$indexName; |
|
| 103 | 103 | } |
| 104 | 104 | if (empty($outputSolrCores)) { |
| 105 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
| 105 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
| 106 | 106 | return BaseCommand::FAILURE; |
| 107 | 107 | } else { |
| 108 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n"); |
|
| 108 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $outputSolrCores)."\n"); |
|
| 109 | 109 | return BaseCommand::FAILURE; |
| 110 | 110 | } |
| 111 | 111 | } |
@@ -147,15 +147,15 @@ discard block |
||
| 147 | 147 | $document = $this->getDocument($input); |
| 148 | 148 | |
| 149 | 149 | if ($document === null) { |
| 150 | - $io->info('INFO: Document with UID "' . $input->getOption('doc') . '" could not be found on PID ' . $this->storagePid . '. It is probably already deleted from DB.'); |
|
| 150 | + $io->info('INFO: Document with UID "'.$input->getOption('doc').'" could not be found on PID '.$this->storagePid.'. It is probably already deleted from DB.'); |
|
| 151 | 151 | } else { |
| 152 | 152 | if ($io->isVerbose()) { |
| 153 | - $io->section('Deleting ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . '.'); |
|
| 153 | + $io->section('Deleting '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.'.'); |
|
| 154 | 154 | } |
| 155 | 155 | $this->documentRepository->remove($document); |
| 156 | 156 | $this->persistenceManager->persistAll(); |
| 157 | 157 | if ($io->isVerbose()) { |
| 158 | - $io->success('Deleted ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . '.'); |
|
| 158 | + $io->success('Deleted '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.'.'); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | private function deleteFromSolr($input, $io, $solrCoreUid): void |
| 175 | 175 | { |
| 176 | 176 | if ($io->isVerbose()) { |
| 177 | - $io->section('Deleting ' . $input->getOption('doc') . ' on Solr core ' . $solrCoreUid . '.'); |
|
| 177 | + $io->section('Deleting '.$input->getOption('doc').' on Solr core '.$solrCoreUid.'.'); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | $isDeleted = false; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | if ($isDeleted) { |
| 189 | 189 | if ($io->isVerbose()) { |
| 190 | - $io->success('Deleted ' . $input->getOption('doc') . ' on Solr core ' . $solrCoreUid . '.'); |
|
| 190 | + $io->success('Deleted '.$input->getOption('doc').' on Solr core '.$solrCoreUid.'.'); |
|
| 191 | 191 | } |
| 192 | 192 | $io->success('All done!'); |
| 193 | 193 | } else { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) { |
| 125 | - $this->searchParams = array_merge($this->searchParams ?: [], $listRequestData['searchParameter']); |
|
| 125 | + $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']); |
|
| 126 | 126 | $listViewSearch = true; |
| 127 | 127 | $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $this->searchParams); |
| 128 | 128 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $simplePagination = new SimplePagination($solrPaginator); |
| 184 | 184 | |
| 185 | 185 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
| 186 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
| 186 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | $this->view->assign('documents', !empty($solrResults) ? $solrResults : []); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | // Add uHash parameter to suggest parameter to make a basic protection of this form. |
| 210 | 210 | if ($this->settings['suggest']) { |
| 211 | - $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest')); |
|
| 211 | + $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest')); |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $this->view->assign('viewData', $this->viewData); |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | // Get facets from plugin configuration. |
| 230 | 230 | $facets = []; |
| 231 | 231 | foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) { |
| 232 | - $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); |
|
| 232 | + $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | $this->view->assign('facetsMenu', $this->makeFacetsMenuArray($facets)); |
@@ -265,13 +265,13 @@ discard block |
||
| 265 | 265 | $searchParams = $this->searchParams; |
| 266 | 266 | if ( |
| 267 | 267 | (!empty($searchParams['fulltext'])) |
| 268 | - || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches) |
|
| 268 | + || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches) |
|
| 269 | 269 | ) { |
| 270 | 270 | // If the query already is a fulltext query e.g using the facets |
| 271 | 271 | $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1]; |
| 272 | 272 | // Search in fulltext field if applicable. Query must not be empty! |
| 273 | 273 | if (!empty($searchParams['query'])) { |
| 274 | - $search['query'] = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')'; |
|
| 274 | + $search['query'] = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')'; |
|
| 275 | 275 | } |
| 276 | 276 | } else { |
| 277 | 277 | // Retain given search field if valid. |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | // add filter query for date search |
| 289 | 289 | if (!empty($this->searchParams['dateFrom']) && !empty($this->searchParams['dateTo'])) { |
| 290 | 290 | // combine dateFrom and dateTo into filterquery as range search |
| 291 | - $search['params']['filterquery'][]['query'] = '{!join from=' . $fields['uid'] . ' to=' . $fields['uid'] . '}' . $fields['date'] . ':[' . $this->searchParams['dateFrom'] . ' TO ' . $this->searchParams['dateTo'] . ']'; |
|
| 291 | + $search['params']['filterquery'][]['query'] = '{!join from='.$fields['uid'].' to='.$fields['uid'].'}'.$fields['date'].':['.$this->searchParams['dateFrom'].' TO '.$this->searchParams['dateTo'].']'; |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | // Add extended search query. |
@@ -306,9 +306,9 @@ discard block |
||
| 306 | 306 | in_array($searchParams['extOperator'][$i], $allowedOperators) |
| 307 | 307 | ) { |
| 308 | 308 | if (!empty($search['query'])) { |
| 309 | - $search['query'] .= ' ' . $searchParams['extOperator'][$i] . ' '; |
|
| 309 | + $search['query'] .= ' '.$searchParams['extOperator'][$i].' '; |
|
| 310 | 310 | } |
| 311 | - $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')'; |
|
| 311 | + $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')'; |
|
| 312 | 312 | } |
| 313 | 313 | } |
| 314 | 314 | } |
@@ -397,24 +397,24 @@ discard block |
||
| 397 | 397 | foreach ($collections as $collectionEntry) { |
| 398 | 398 | // check for virtual collections query string |
| 399 | 399 | if ($collectionEntry->getIndexSearch()) { |
| 400 | - $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '(' . $collectionEntry->getIndexSearch() . ')' : ' OR (' . $collectionEntry->getIndexSearch() . ')'; |
|
| 400 | + $virtualCollectionsQueryString .= empty($virtualCollectionsQueryString) ? '('.$collectionEntry->getIndexSearch().')' : ' OR ('.$collectionEntry->getIndexSearch().')'; |
|
| 401 | 401 | } else { |
| 402 | - $collectionsQueryString .= empty($collectionsQueryString) ? '"' . $collectionEntry->getIndexName() . '"' : ' OR "' . $collectionEntry->getIndexName() . '"'; |
|
| 402 | + $collectionsQueryString .= empty($collectionsQueryString) ? '"'.$collectionEntry->getIndexName().'"' : ' OR "'.$collectionEntry->getIndexName().'"'; |
|
| 403 | 403 | } |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | // distinguish between simple collection browsing and actual searching within the collection(s) |
| 407 | 407 | if (!empty($collectionsQueryString)) { |
| 408 | 408 | if (empty($query)) { |
| 409 | - $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . ') AND toplevel:true AND partof:0)'; |
|
| 409 | + $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.') AND toplevel:true AND partof:0)'; |
|
| 410 | 410 | } else { |
| 411 | - $collectionsQueryString = '(collection_faceting:(' . $collectionsQueryString . '))'; |
|
| 411 | + $collectionsQueryString = '(collection_faceting:('.$collectionsQueryString.'))'; |
|
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | // virtual collections might query documents that are neither toplevel:true nor partof:0 and need to be searched separately |
| 416 | 416 | if (!empty($virtualCollectionsQueryString)) { |
| 417 | - $virtualCollectionsQueryString = '(' . $virtualCollectionsQueryString . ')'; |
|
| 417 | + $virtualCollectionsQueryString = '('.$virtualCollectionsQueryString.')'; |
|
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | // combine both querystrings into a single filterquery via OR if both are given, otherwise pass either of those |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | $entryArray['doNotLinkIt'] = 0; |
| 445 | 445 | // Check if facet is already selected. |
| 446 | 446 | $queryColumn = array_column($search['params']['filterquery'], 'query'); |
| 447 | - $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn); |
|
| 447 | + $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn); |
|
| 448 | 448 | if ($index !== false) { |
| 449 | 449 | // Facet is selected, thus remove it from filter. |
| 450 | 450 | unset($queryColumn[$index]); |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | } |
| 459 | 459 | } else { |
| 460 | 460 | // Facet is not selected, thus add it to filter. |
| 461 | - $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")'; |
|
| 461 | + $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")'; |
|
| 462 | 462 | $entryArray['ITEM_STATE'] = 'NO'; |
| 463 | 463 | } |
| 464 | 464 | $entryArray['queryColumn'] = $queryColumn; |
@@ -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 "view3d". |
| 77 | 77 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_view3d'] = 'layout,select_key,pages,recursive'; |
| 78 | 78 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_view3d'] = 'pi_flexform'; |
| 79 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_view3d', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/View3D.xml'); |
|
| 79 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_view3d', 'FILE:EXT:'.'dlf/Configuration/FlexForms/View3D.xml'); |
|
| 80 | 80 | |
| 81 | 81 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
| 82 | 82 | 'Dlf', |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // extract collection(s) from collection parameter |
| 83 | 83 | $collections = []; |
| 84 | 84 | if (array_key_exists('collection', $this->searchParams)) { |
| 85 | - foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 85 | + foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { |
|
| 86 | 86 | $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry); |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $simplePagination = new SimplePagination($solrPaginator); |
| 111 | 111 | |
| 112 | 112 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
| 113 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
| 113 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $this->view->assign('viewData', $this->viewData); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | if (empty(array_filter($metadata))) { |
| 139 | - $this->logger->warning('No metadata found for document with UID ' . $this->document->getUid()); |
|
| 139 | + $this->logger->warning('No metadata found for document with UID '.$this->document->getUid()); |
|
| 140 | 140 | return; |
| 141 | 141 | } |
| 142 | 142 | ksort($metadata); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $this->parseMetadata($i, $name, $value, $metadata); |
| 175 | 175 | |
| 176 | 176 | if (is_array($metadata[$i][$name])) { |
| 177 | - $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function ($metadataValue) { |
|
| 177 | + $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function($metadataValue) { |
|
| 178 | 178 | return !empty($metadataValue); |
| 179 | 179 | })); |
| 180 | 180 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | if (empty(implode('', $value)) && $this->settings['getTitle'] && $this->document->getPartof()) { |
| 392 | 392 | $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), true); |
| 393 | 393 | if (!empty($superiorTitle)) { |
| 394 | - $metadata[$i]['title'] = ['[' . $superiorTitle . ']']; |
|
| 394 | + $metadata[$i]['title'] = ['['.$superiorTitle.']']; |
|
| 395 | 395 | } |
| 396 | 396 | } |
| 397 | 397 | } |
@@ -66,20 +66,20 @@ |
||
| 66 | 66 | $_EXTKEY = 'dlf'; |
| 67 | 67 | // Register tools for toolbox plugin. |
| 68 | 68 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = []; |
| 69 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool'; |
|
| 70 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool'; |
|
| 71 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool'; |
|
| 72 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool'; |
|
| 73 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool'; |
|
| 74 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool'; |
|
| 75 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool'; |
|
| 69 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool'; |
|
| 70 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.annotationtool'; |
|
| 71 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool'; |
|
| 72 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool'; |
|
| 73 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool'; |
|
| 74 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool'; |
|
| 75 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool'; |
|
| 76 | 76 | // Register hooks. |
| 77 | 77 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 78 | 78 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 79 | 79 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class; |
| 80 | 80 | // Register AJAX eID handlers. |
| 81 | 81 | if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) { |
| 82 | - $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main'; |
|
| 82 | + $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main'; |
|
| 83 | 83 | } |
| 84 | 84 | // Use Caching Framework for Solr queries |
| 85 | 85 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] ??= []; |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | |
| 251 | 251 | $data['tx_dlf_metadata'][uniqid('NEW')] = [ |
| 252 | 252 | 'pid' => $this->pid, |
| 253 | - 'label' => $this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels), |
|
| 253 | + 'label' => $this->getLLL('metadata.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels), |
|
| 254 | 254 | 'index_name' => $indexName, |
| 255 | 255 | 'format' => implode(',', $formatIds), |
| 256 | 256 | 'default_value' => $values['default_value'], |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | 'pid' => $this->pid, |
| 290 | 290 | 'sys_language_uid' => $siteLanguage->getLanguageId(), |
| 291 | 291 | 'l18n_parent' => $id, |
| 292 | - 'label' => $this->getLLL('metadata.' . $indexName, $siteLanguage->getTypo3Language(), $metadataLabels), |
|
| 292 | + 'label' => $this->getLLL('metadata.'.$indexName, $siteLanguage->getTypo3Language(), $metadataLabels), |
|
| 293 | 293 | ]; |
| 294 | 294 | } |
| 295 | 295 | |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | |
| 316 | 316 | if ($this->solrCoreRepository->findOneByPid($this->pid) === null) { |
| 317 | 317 | $newRecord = GeneralUtility::makeInstance(SolrCore::class); |
| 318 | - $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')'); |
|
| 318 | + $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels).' (PID '.$this->pid.')'); |
|
| 319 | 319 | $indexName = Solr::createCore(''); |
| 320 | 320 | if (!empty($indexName)) { |
| 321 | 321 | $newRecord->setIndexName($indexName); |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $data['tx_dlf_structures'][uniqid('NEW')] = [ |
| 356 | 356 | 'pid' => $this->pid, |
| 357 | 357 | 'toplevel' => $values['toplevel'], |
| 358 | - 'label' => $this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structureLabels), |
|
| 358 | + 'label' => $this->getLLL('structure.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $structureLabels), |
|
| 359 | 359 | 'index_name' => $indexName, |
| 360 | 360 | 'oai_name' => $values['oai_name'], |
| 361 | 361 | 'thumbnail' => 0, |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | 'pid' => $this->pid, |
| 381 | 381 | 'sys_language_uid' => $siteLanguage->getLanguageId(), |
| 382 | 382 | 'l18n_parent' => $id, |
| 383 | - 'label' => $this->getLLL('structure.' . $indexName, $siteLanguage->getTypo3Language(), $structureLabels), |
|
| 383 | + 'label' => $this->getLLL('structure.'.$indexName, $siteLanguage->getTypo3Language(), $structureLabels), |
|
| 384 | 384 | ]; |
| 385 | 385 | } |
| 386 | 386 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | } elseif (isset($langArray['default'][$index][0]['target'])) { |
| 476 | 476 | return $langArray['default'][$index][0]['target']; |
| 477 | 477 | } else { |
| 478 | - return 'Missing translation for ' . $index; |
|
| 478 | + return 'Missing translation for '.$index; |
|
| 479 | 479 | } |
| 480 | 480 | } |
| 481 | 481 | |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | */ |
| 491 | 491 | private function getRecords(string $recordType): array |
| 492 | 492 | { |
| 493 | - $filePath = Environment::getPublicPath() . '/typo3conf/ext/dlf/Resources/Private/Data/' . $recordType . 'Defaults.json'; |
|
| 493 | + $filePath = Environment::getPublicPath().'/typo3conf/ext/dlf/Resources/Private/Data/'.$recordType.'Defaults.json'; |
|
| 494 | 494 | |
| 495 | 495 | $resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class); |
| 496 | 496 | $fileObject = $resourceFactory->getFileObjectFromCombinedIdentifier($filePath); |