@@ -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; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->initializeRepositories((int) $input->getOption('pid')); |
115 | 115 | |
116 | 116 | if ($this->storagePid == 0) { |
117 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
117 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
118 | 118 | return BaseCommand::FAILURE; |
119 | 119 | } |
120 | 120 | |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
130 | 130 | $outputSolrCores = []; |
131 | 131 | foreach ($allSolrCores as $indexName => $uid) { |
132 | - $outputSolrCores[] = $uid . ' : ' . $indexName; |
|
132 | + $outputSolrCores[] = $uid.' : '.$indexName; |
|
133 | 133 | } |
134 | 134 | if (empty($outputSolrCores)) { |
135 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
135 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
136 | 136 | return BaseCommand::FAILURE; |
137 | 137 | } else { |
138 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n"); |
|
138 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $outputSolrCores)."\n"); |
|
139 | 139 | return BaseCommand::FAILURE; |
140 | 140 | } |
141 | 141 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | ->setLimit((int) $input->getOption('index-limit')) |
166 | 166 | ->setOffset((int) $input->getOption('index-begin')) |
167 | 167 | ->execute(); |
168 | - $io->writeln($input->getOption('index-limit') . ' documents starting from ' . $input->getOption('index-begin') . ' will be indexed.'); |
|
168 | + $io->writeln($input->getOption('index-limit').' documents starting from '.$input->getOption('index-begin').' will be indexed.'); |
|
169 | 169 | } else { |
170 | 170 | // Get all documents. |
171 | 171 | $documents = $this->documentRepository->findAll(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | ) { |
188 | 188 | $documents = $this->documentRepository->findAllByCollectionsLimited($collections, (int) $input->getOption('index-limit'), (int) $input->getOption('index-begin')); |
189 | 189 | |
190 | - $io->writeln($input->getOption('index-limit') . ' documents starting from ' . $input->getOption('index-begin') . ' will be indexed.'); |
|
190 | + $io->writeln($input->getOption('index-limit').' documents starting from '.$input->getOption('index-begin').' will be indexed.'); |
|
191 | 191 | } else { |
192 | 192 | // Get all documents of given collections. |
193 | 193 | $documents = $this->documentRepository->findAllByCollectionsLimited($collections, 0); |
@@ -201,15 +201,15 @@ discard block |
||
201 | 201 | $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $this->storagePid], true); |
202 | 202 | |
203 | 203 | if ($doc === null) { |
204 | - $io->warning('WARNING: Document "' . $document->getLocation() . '" could not be loaded. Skip to next document.'); |
|
204 | + $io->warning('WARNING: Document "'.$document->getLocation().'" could not be loaded. Skip to next document.'); |
|
205 | 205 | continue; |
206 | 206 | } |
207 | 207 | |
208 | 208 | if ($dryRun) { |
209 | - $io->writeln('DRY RUN: Would index ' . ($id + 1) . '/' . count($documents) . ' with UID "' . $document->getUid() . '" ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
209 | + $io->writeln('DRY RUN: Would index '.($id + 1).'/'.count($documents).' with UID "'.$document->getUid().'" ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
210 | 210 | } else { |
211 | 211 | if ($io->isVerbose()) { |
212 | - $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . ($id + 1) . '/' . count($documents) . ' with UID "' . $document->getUid() . '" ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
212 | + $io->writeln(date('Y-m-d H:i:s').' Indexing '.($id + 1).'/'.count($documents).' with UID "'.$document->getUid().'" ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
213 | 213 | } |
214 | 214 | $document->setCurrentDocument($doc); |
215 | 215 | // save to database |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->initializeRepositories((int) $input->getOption('pid')); |
112 | 112 | |
113 | 113 | if ($this->storagePid == 0) { |
114 | - $io->error('ERROR: No valid PID (' . $this->storagePid . ') given.'); |
|
114 | + $io->error('ERROR: No valid PID ('.$this->storagePid.') given.'); |
|
115 | 115 | return BaseCommand::FAILURE; |
116 | 116 | } |
117 | 117 | |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
130 | 130 | $outputSolrCores = []; |
131 | 131 | foreach ($allSolrCores as $indexName => $uid) { |
132 | - $outputSolrCores[] = $uid . ' : ' . $indexName; |
|
132 | + $outputSolrCores[] = $uid.' : '.$indexName; |
|
133 | 133 | } |
134 | 134 | if (empty($outputSolrCores)) { |
135 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n"); |
|
135 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$this->storagePid.".\n"); |
|
136 | 136 | return BaseCommand::FAILURE; |
137 | 137 | } else { |
138 | - $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n"); |
|
138 | + $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $outputSolrCores)."\n"); |
|
139 | 139 | return BaseCommand::FAILURE; |
140 | 140 | } |
141 | 141 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | return BaseCommand::FAILURE; |
156 | 156 | } |
157 | 157 | if (!GeneralUtility::isValidUrl($baseUrl)) { |
158 | - $io->error('ERROR: No valid OAI Base URL set for library with given UID ("' . $input->getOption('lib') . '").'); |
|
158 | + $io->error('ERROR: No valid OAI Base URL set for library with given UID ("'.$input->getOption('lib').'").'); |
|
159 | 159 | return BaseCommand::FAILURE; |
160 | 160 | } else { |
161 | 161 | try { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | } |
198 | 198 | } |
199 | 199 | if (empty($set)) { |
200 | - $io->error('ERROR: OAI interface does not provide a set with given setSpec ("' . $input->getOption('set') . '").'); |
|
200 | + $io->error('ERROR: OAI interface does not provide a set with given setSpec ("'.$input->getOption('set').'").'); |
|
201 | 201 | return BaseCommand::FAILURE; |
202 | 202 | } |
203 | 203 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | // Process all identifiers. |
218 | - $baseLocation = $baseUrl . (parse_url($baseUrl, PHP_URL_QUERY) ? '&' : '?'); |
|
218 | + $baseLocation = $baseUrl.(parse_url($baseUrl, PHP_URL_QUERY) ? '&' : '?'); |
|
219 | 219 | foreach ($identifiers as $identifier) { |
220 | 220 | // Build OAI GetRecord URL... |
221 | 221 | $params = [ |
@@ -223,13 +223,13 @@ discard block |
||
223 | 223 | 'metadataPrefix' => 'mets', |
224 | 224 | 'identifier' => (string) $identifier->identifier |
225 | 225 | ]; |
226 | - $docLocation = $baseLocation . http_build_query($params); |
|
226 | + $docLocation = $baseLocation.http_build_query($params); |
|
227 | 227 | // ...index the document... |
228 | 228 | $document = null; |
229 | 229 | $doc = AbstractDocument::getInstance($docLocation, ['storagePid' => $this->storagePid], true); |
230 | 230 | |
231 | 231 | if ($doc === null) { |
232 | - $io->warning('WARNING: Document "' . $docLocation . '" could not be loaded. Skip to next document.'); |
|
232 | + $io->warning('WARNING: Document "'.$docLocation.'" could not be loaded. Skip to next document.'); |
|
233 | 233 | continue; |
234 | 234 | } |
235 | 235 | |
@@ -246,10 +246,10 @@ discard block |
||
246 | 246 | $document->setSolrcore($solrCoreUid); |
247 | 247 | |
248 | 248 | if ($dryRun) { |
249 | - $io->writeln('DRY RUN: Would index ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
249 | + $io->writeln('DRY RUN: Would index '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
250 | 250 | } else { |
251 | 251 | if ($io->isVerbose()) { |
252 | - $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . ' and Solr core ' . $solrCoreUid . '.'); |
|
252 | + $io->writeln(date('Y-m-d H:i:s').' Indexing '.$document->getUid().' ("'.$document->getLocation().'") on PID '.$this->storagePid.' and Solr core '.$solrCoreUid.'.'); |
|
253 | 253 | } |
254 | 254 | $document->setCurrentDocument($doc); |
255 | 255 | // save to database |
@@ -276,6 +276,6 @@ discard block |
||
276 | 276 | */ |
277 | 277 | protected function handleOaiError(BaseoaipmhException $exception, SymfonyStyle $io): void |
278 | 278 | { |
279 | - $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:' . "\n " . $exception->getMessage()); |
|
279 | + $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:'."\n ".$exception->getMessage()); |
|
280 | 280 | } |
281 | 281 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $simplePagination = new SimplePagination($solrPaginator); |
169 | 169 | |
170 | 170 | $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator); |
171 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]); |
|
171 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $this->view->assign('viewData', $this->viewData); |
@@ -220,9 +220,9 @@ discard block |
||
220 | 220 | foreach ($collections as $collection) { |
221 | 221 | $solrQuery = ''; |
222 | 222 | if ($collection->getIndexSearch() != '') { |
223 | - $solrQuery .= '(' . $collection->getIndexSearch() . ')'; |
|
223 | + $solrQuery .= '('.$collection->getIndexSearch().')'; |
|
224 | 224 | } else { |
225 | - $solrQuery .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")'; |
|
225 | + $solrQuery .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | // We only care about the UID and partOf in the results and want them sorted |
@@ -236,11 +236,11 @@ discard block |
||
236 | 236 | if ($collection->getIndexSearch()) { |
237 | 237 | $params['query'] = $solrQuery; |
238 | 238 | } else { |
239 | - $params['query'] = $solrQuery . ' AND partof:0 AND toplevel:true'; |
|
239 | + $params['query'] = $solrQuery.' AND partof:0 AND toplevel:true'; |
|
240 | 240 | } |
241 | 241 | $partOfNothing = $solr->searchRaw($params); |
242 | 242 | |
243 | - $params['query'] = $solrQuery . ' AND NOT partof:0 AND toplevel:true'; |
|
243 | + $params['query'] = $solrQuery.' AND NOT partof:0 AND toplevel:true'; |
|
244 | 244 | $partOfSomething = $solr->searchRaw($params); |
245 | 245 | |
246 | 246 | $collectionInfo = []; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
164 | - $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB'); |
|
164 | + $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB'); |
|
165 | 165 | } |
166 | 166 | return $entryArray; |
167 | 167 | } |
@@ -338,16 +338,16 @@ discard block |
||
338 | 338 | $title = ''; |
339 | 339 | foreach ($fields as $field) { |
340 | 340 | if ($field == 'type') { |
341 | - $title .= $this->getTranslatedType($entry['type']) . ' '; |
|
341 | + $title .= $this->getTranslatedType($entry['type']).' '; |
|
342 | 342 | } else { |
343 | - $title .= $entry[$field] . ' '; |
|
343 | + $title .= $entry[$field].' '; |
|
344 | 344 | } |
345 | 345 | } |
346 | 346 | return trim($title); |
347 | 347 | } |
348 | 348 | } |
349 | 349 | } |
350 | - return $label ?: $orderLabel; |
|
350 | + return $label ? : $orderLabel; |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | { |
383 | 383 | usort( |
384 | 384 | $menu[0]['_SUB_MENU'], |
385 | - function ($firstElement, $secondElement) { |
|
385 | + function($firstElement, $secondElement) { |
|
386 | 386 | if (!empty($firstElement['orderlabel'])) { |
387 | 387 | return $firstElement['orderlabel'] <=> $secondElement['orderlabel']; |
388 | 388 | } |
@@ -155,8 +155,8 @@ |
||
155 | 155 | ->select(...explode(',', $fields)) |
156 | 156 | ->from($table) |
157 | 157 | ->where( |
158 | - $queryBuilder->expr()->eq($table . '.pid', $this->storagePid), |
|
159 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
158 | + $queryBuilder->expr()->eq($table.'.pid', $this->storagePid), |
|
159 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
160 | 160 | $andWhere |
161 | 161 | ) |
162 | 162 | ->orderBy($sorting) |
@@ -59,8 +59,8 @@ |
||
59 | 59 | |
60 | 60 | // Text field for document URL |
61 | 61 | $fieldName = 'doc'; |
62 | - $fieldId = 'task_' . $fieldName; |
|
63 | - $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >'; |
|
62 | + $fieldId = 'task_'.$fieldName; |
|
63 | + $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >'; |
|
64 | 64 | $additionalFields[$fieldId] = [ |
65 | 65 | 'code' => $fieldHtml, |
66 | 66 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.doc', |
@@ -65,16 +65,16 @@ discard block |
||
65 | 65 | |
66 | 66 | // Text field for library |
67 | 67 | $fieldName = 'lib'; |
68 | - $fieldId = 'task_' . $fieldName; |
|
68 | + $fieldId = 'task_'.$fieldName; |
|
69 | 69 | |
70 | 70 | $allLibraries = $this->getLibraries($taskInfo['pid']); |
71 | 71 | $options = []; |
72 | 72 | $options[] = '<option value="-1"></option>'; |
73 | 73 | foreach ($allLibraries as $label => $uid) { |
74 | - $options[] = '<option value="' . $uid . '" ' . ($taskInfo['lib'] == $uid ? 'selected' : '') . ' >' . $label . '</option>'; |
|
74 | + $options[] = '<option value="'.$uid.'" '.($taskInfo['lib'] == $uid ? 'selected' : '').' >'.$label.'</option>'; |
|
75 | 75 | } |
76 | 76 | |
77 | - $fieldHtml = '<select name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '">' . implode("\n", $options) . '</select>'; |
|
77 | + $fieldHtml = '<select name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'">'.implode("\n", $options).'</select>'; |
|
78 | 78 | $additionalFields[$fieldId] = [ |
79 | 79 | 'code' => $fieldHtml, |
80 | 80 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.lib', |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | |
91 | 91 | // Text field for from |
92 | 92 | $fieldName = 'from'; |
93 | - $fieldId = 'task_' . $fieldName; |
|
94 | - $fieldHtml = '<input type="date" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >'; |
|
93 | + $fieldId = 'task_'.$fieldName; |
|
94 | + $fieldHtml = '<input type="date" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >'; |
|
95 | 95 | $additionalFields[$fieldId] = [ |
96 | 96 | 'code' => $fieldHtml, |
97 | 97 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.from', |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | |
102 | 102 | // Text field for until |
103 | 103 | $fieldName = 'until'; |
104 | - $fieldId = 'task_' . $fieldName; |
|
105 | - $fieldHtml = '<input type="date" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >'; |
|
104 | + $fieldId = 'task_'.$fieldName; |
|
105 | + $fieldHtml = '<input type="date" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >'; |
|
106 | 106 | $additionalFields[$fieldId] = [ |
107 | 107 | 'code' => $fieldHtml, |
108 | 108 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.until', |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | |
113 | 113 | // Text field for set |
114 | 114 | $fieldName = 'set'; |
115 | - $fieldId = 'task_' . $fieldName; |
|
116 | - $fieldHtml = '<input type="text" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="' . $taskInfo[$fieldName] . '" >'; |
|
115 | + $fieldId = 'task_'.$fieldName; |
|
116 | + $fieldHtml = '<input type="text" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="'.$taskInfo[$fieldName].'" >'; |
|
117 | 117 | $additionalFields[$fieldId] = [ |
118 | 118 | 'code' => $fieldHtml, |
119 | 119 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.set', |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | |
64 | 64 | // Select for collection(s) |
65 | 65 | $fieldName = 'coll'; |
66 | - $fieldId = 'task_' . $fieldName; |
|
66 | + $fieldId = 'task_'.$fieldName; |
|
67 | 67 | $options = $this->getCollOptions($taskInfo['coll'], $taskInfo['pid']); |
68 | 68 | ; |
69 | - $fieldHtml = '<select name="tx_scheduler[' . $fieldName . '][]" id="' . $fieldId . '" size="10" multiple="multiple">' . implode("\n", $options) . '</select>'; |
|
69 | + $fieldHtml = '<select name="tx_scheduler['.$fieldName.'][]" id="'.$fieldId.'" size="10" multiple="multiple">'.implode("\n", $options).'</select>'; |
|
70 | 70 | $additionalFields[$fieldId] = [ |
71 | 71 | 'code' => $fieldHtml, |
72 | 72 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.coll', |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | |
86 | 86 | // Checkbox for all |
87 | 87 | $fieldName = 'all'; |
88 | - $fieldId = 'task_' . $fieldName; |
|
89 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . |
|
90 | - ($taskInfo['all'] ? ' checked="checked"' : '') . '>'; |
|
88 | + $fieldId = 'task_'.$fieldName; |
|
89 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'. |
|
90 | + ($taskInfo['all'] ? ' checked="checked"' : '').'>'; |
|
91 | 91 | $additionalFields[$fieldId] = [ |
92 | 92 | 'code' => $fieldHtml, |
93 | 93 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.all', |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $options = []; |
112 | 112 | $collections = $this->getCollections($pid); |
113 | 113 | foreach ($collections as $label => $uid) { |
114 | - $options[] = '<option value="' . $uid . '" ' . (in_array($uid, $coll) ? 'selected' : '') . ' >' . $label . '</option>'; |
|
114 | + $options[] = '<option value="'.$uid.'" '.(in_array($uid, $coll) ? 'selected' : '').' >'.$label.'</option>'; |
|
115 | 115 | } |
116 | 116 | return $options; |
117 | 117 | } |