@@ -26,8 +26,7 @@ |
||
26 | 26 | * |
27 | 27 | * @access public |
28 | 28 | */ |
29 | -class XmlSchemesValidatorTest extends UnitTestCase |
|
30 | -{ |
|
29 | +class XmlSchemesValidatorTest extends UnitTestCase { |
|
31 | 30 | const METS = <<<METS |
32 | 31 | <mets:mets |
33 | 32 | xmlns:mets="http://www.loc.gov/METS/" |
@@ -70,7 +70,7 @@ |
||
70 | 70 | public function setUp(): void |
71 | 71 | { |
72 | 72 | parent::setUp(); |
73 | - $this->resetSingletonInstances = true; |
|
73 | + $this->resetSingletonInstances = TRUE; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | public function testValidation(): void |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | if ($doc !== null) { |
165 | 165 | $this->document->setCurrentDocument($doc); |
166 | 166 | } else { |
167 | - $this->logger->error('Failed to load document with record ID "' . $this->requestData['recordId'] . '"'); |
|
167 | + $this->logger->error('Failed to load document with record ID "'.$this->requestData['recordId'].'"'); |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | } else { |
171 | - $this->logger->error('Invalid ID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
171 | + $this->logger->error('Invalid ID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | && !MathUtility::canBeInterpretedAsInteger($this->requestData['id']) |
266 | 266 | && !GeneralUtility::isValidUrl($this->requestData['id']) |
267 | 267 | ) { |
268 | - $this->logger->warning('Invalid ID or URI "' . $this->requestData['id'] . '" for document loading'); |
|
268 | + $this->logger->warning('Invalid ID or URI "'.$this->requestData['id'].'" for document loading'); |
|
269 | 269 | unset($this->requestData['id']); |
270 | 270 | } |
271 | 271 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | { |
326 | 326 | if (!array_key_exists($setting, $this->settings) || empty($this->settings[$setting])) { |
327 | 327 | $this->settings[$setting] = $value; |
328 | - $this->logger->warning('Setting "' . $setting . '" not set, using default value "' . $value . '". Probably FlexForm for controller "' . get_class($this) . '" is not read.'); |
|
328 | + $this->logger->warning('Setting "'.$setting.'" not set, using default value "'.$value.'". Probably FlexForm for controller "'.get_class($this).'" is not read.'); |
|
329 | 329 | } else { |
330 | 330 | $this->settings[$setting] = (int) $this->settings[$setting]; |
331 | 331 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $pages = []; |
411 | 411 | $pagesSect = []; |
412 | 412 | $aRange = []; |
413 | - $nRange = 5; // ToDo: should be made configurable |
|
413 | + $nRange = 5; // ToDo: should be made configurable |
|
414 | 414 | |
415 | 415 | // lower limit of the range |
416 | 416 | $nBottom = $currentPageNumber - $nRange; |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | |
426 | 426 | // check whether the first screen page is > 1, if yes then points must be added |
427 | 427 | if ($aRange[0] > 1) { |
428 | - array_push($pagesSect, ['label' => '...','startRecordNumber' => '...']); |
|
428 | + array_push($pagesSect, ['label' => '...', 'startRecordNumber' => '...']); |
|
429 | 429 | }; |
430 | 430 | $lastStartRecordNumberGrid = 0; // due to validity outside the loop |
431 | 431 | foreach (range($firstPage, $lastPage) as $i) { |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | // Check if screen page is in range |
470 | 470 | if (in_array($i, $aRange)) { |
471 | - array_push($pagesSect, ['label' => $i,'startRecordNumber' => $startRecordNumber]); |
|
471 | + array_push($pagesSect, ['label' => $i, 'startRecordNumber' => $startRecordNumber]); |
|
472 | 472 | }; |
473 | 473 | }; |
474 | 474 | }; |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | // fix for count(): Argument #1 ($value) must be of type Countable|array, null given |
535 | 535 | $this->documentArray[] = $doc; |
536 | 536 | } else { |
537 | - $this->logger->error('Invalid UID "' . $documentId . '" or PID "' . $this->settings['storagePid'] . '" for document loading'); |
|
537 | + $this->logger->error('Invalid UID "'.$documentId.'" or PID "'.$this->settings['storagePid'].'" for document loading'); |
|
538 | 538 | } |
539 | 539 | |
540 | 540 | return $doc; |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | foreach ($this->requestData['multipleSource'] as $location) { |
573 | 573 | $document = AbstractDocument::getInstance($location, $this->settings, true); |
574 | 574 | if ($document !== null) { |
575 | - $this->documentArray['extra_' . $i] = $document; |
|
575 | + $this->documentArray['extra_'.$i] = $document; |
|
576 | 576 | } |
577 | 577 | $i++; |
578 | 578 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | |
597 | 597 | $this->document->setLocation($documentId); |
598 | 598 | } else { |
599 | - $this->logger->error('Invalid location given "' . $documentId . '" for document loading'); |
|
599 | + $this->logger->error('Invalid location given "'.$documentId.'" for document loading'); |
|
600 | 600 | } |
601 | 601 | |
602 | 602 | return $doc; |
@@ -39,8 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @abstract |
41 | 41 | */ |
42 | -abstract class AbstractController extends ActionController implements LoggerAwareInterface |
|
43 | -{ |
|
42 | +abstract class AbstractController extends ActionController implements LoggerAwareInterface { |
|
44 | 43 | use LoggerAwareTrait; |
45 | 44 | |
46 | 45 | /** |
@@ -248,8 +247,7 @@ discard block |
||
248 | 247 | * |
249 | 248 | * @return null|string|array |
250 | 249 | */ |
251 | - protected function getParametersSafely(string $parameterName) |
|
252 | - { |
|
250 | + protected function getParametersSafely(string $parameterName) { |
|
253 | 251 | if ($this->request->hasArgument($parameterName)) { |
254 | 252 | return $this->request->getArgument($parameterName); |
255 | 253 | } |
@@ -444,7 +442,8 @@ discard block |
||
444 | 442 | $lastStartRecordNumberGrid = 0; // due to validity outside the loop |
445 | 443 | foreach (range($firstPage, $lastPage) as $i) { |
446 | 444 | // detect which pagination is active: ListView or GridView |
447 | - if (get_class($pagination) == 'TYPO3\CMS\Core\Pagination\SimplePagination') { // ListView |
|
445 | + if (get_class($pagination) == 'TYPO3\CMS\Core\Pagination\SimplePagination') { |
|
446 | +// ListView |
|
448 | 447 | $lastStartRecordNumberGrid = $i; // save last $startRecordNumber for LastPage button |
449 | 448 | |
450 | 449 | $pages[$i] = [ |
@@ -457,7 +456,8 @@ discard block |
||
457 | 456 | if (in_array($i, $aRange)) { |
458 | 457 | array_push($pagesSect, ['label' => $i, 'startRecordNumber' => $i]); |
459 | 458 | }; |
460 | - } else { // GridView |
|
459 | + } else { |
|
460 | +// GridView |
|
461 | 461 | // to calculate the values for generation the links for the pagination pages |
462 | 462 | /** @var \Kitodo\Dlf\Pagination\PageGridPaginator $paginator */ |
463 | 463 | $itemsPerPage = $paginator->getPublicItemsPerPage(); |
@@ -537,8 +537,7 @@ discard block |
||
537 | 537 | * |
538 | 538 | * @return AbstractDocument |
539 | 539 | */ |
540 | - private function getDocumentByUid(int $documentId) |
|
541 | - { |
|
540 | + private function getDocumentByUid(int $documentId) { |
|
542 | 541 | // TODO: implement multiView as it is in getDocumentByUrl |
543 | 542 | $doc = null; |
544 | 543 | $this->document = $this->documentRepository->findOneByIdAndSettings($documentId); |
@@ -563,8 +562,7 @@ discard block |
||
563 | 562 | * |
564 | 563 | * @return AbstractDocument |
565 | 564 | */ |
566 | - protected function getDocumentByUrl(string $documentId) |
|
567 | - { |
|
565 | + protected function getDocumentByUrl(string $documentId) { |
|
568 | 566 | $doc = AbstractDocument::getInstance($documentId, $this->settings, true); |
569 | 567 | |
570 | 568 | if (isset($this->settings['multiViewType']) && $doc->tableOfContents[0]['type'] === $this->settings['multiViewType']) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @access protected |
66 | 66 | * @var Document|null This holds the current document |
67 | 67 | */ |
68 | - protected ?Document $document = null; |
|
68 | + protected ?Document $document = NULL; |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * @access protected |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | // Try to get document format from database |
150 | 150 | if (!empty($documentId)) { |
151 | 151 | |
152 | - $doc = null; |
|
152 | + $doc = NULL; |
|
153 | 153 | |
154 | 154 | if (MathUtility::canBeInterpretedAsInteger($documentId)) { |
155 | 155 | $doc = $this->getDocumentByUid($documentId); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $doc = $this->getDocumentByUrl($documentId); |
158 | 158 | } |
159 | 159 | |
160 | - if ($this->document !== null && $doc !== null) { |
|
160 | + if ($this->document !== NULL && $doc !== NULL) { |
|
161 | 161 | $this->document->setCurrentDocument($doc); |
162 | 162 | } |
163 | 163 | |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | |
166 | 166 | $this->document = $this->documentRepository->findOneByRecordId($this->requestData['recordId']); |
167 | 167 | |
168 | - if ($this->document !== null) { |
|
169 | - $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, true); |
|
170 | - if ($doc !== null) { |
|
168 | + if ($this->document !== NULL) { |
|
169 | + $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, TRUE); |
|
170 | + if ($doc !== NULL) { |
|
171 | 171 | $this->document->setCurrentDocument($doc); |
172 | 172 | } else { |
173 | 173 | $this->logger->error('Failed to load document with record ID "' . $this->requestData['recordId'] . '"'); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | protected function isDocMissing(): bool |
226 | 226 | { |
227 | - return $this->document === null || $this->document->getCurrentDocument() === null; |
|
227 | + return $this->document === NULL || $this->document->getCurrentDocument() === NULL; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | if ($this->request->hasArgument($parameterName)) { |
254 | 254 | return $this->request->getArgument($parameterName); |
255 | 255 | } |
256 | - return null; |
|
256 | + return NULL; |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | /** |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | if (isset($this->settings['multiViewType']) && $this->document->getCurrentDocument()->tableOfContents[0]['type'] === $this->settings['multiViewType']) { |
382 | 382 | $i = 0; |
383 | 383 | foreach ($this->documentArray as $document) { |
384 | - if ($document !== null) { |
|
384 | + if ($document !== NULL) { |
|
385 | 385 | $this->requestData['docPage'][$i] = MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i], 1, $document->numPages, 1); |
386 | 386 | $i++; |
387 | 387 | } |
@@ -496,8 +496,8 @@ discard block |
||
496 | 496 | }; |
497 | 497 | |
498 | 498 | // Safely get the next and previous page numbers |
499 | - $nextPageNumber = isset($pages[$currentPageNumber + 1]) ? $pages[$currentPageNumber + 1]['startRecordNumber'] : null; |
|
500 | - $previousPageNumber = isset($pages[$currentPageNumber - 1]) ? $pages[$currentPageNumber - 1]['startRecordNumber'] : null; |
|
499 | + $nextPageNumber = isset($pages[$currentPageNumber + 1]) ? $pages[$currentPageNumber + 1]['startRecordNumber'] : NULL; |
|
500 | + $previousPageNumber = isset($pages[$currentPageNumber - 1]) ? $pages[$currentPageNumber - 1]['startRecordNumber'] : NULL; |
|
501 | 501 | |
502 | 502 | // 'startRecordNumber' is not required in GridView, only the variant for each loop is required |
503 | 503 | // 'endRecordNumber' is not required in both views |
@@ -543,11 +543,11 @@ discard block |
||
543 | 543 | private function getDocumentByUid(int $documentId) |
544 | 544 | { |
545 | 545 | // TODO: implement multiView as it is in getDocumentByUrl |
546 | - $doc = null; |
|
546 | + $doc = NULL; |
|
547 | 547 | $this->document = $this->documentRepository->findOneByIdAndSettings($documentId); |
548 | 548 | |
549 | 549 | if ($this->document) { |
550 | - $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, true); |
|
550 | + $doc = AbstractDocument::getInstance($this->document->getLocation(), $this->settings, TRUE); |
|
551 | 551 | // fix for count(): Argument #1 ($value) must be of type Countable|array, null given |
552 | 552 | $this->documentArray[] = $doc; |
553 | 553 | } else { |
@@ -568,13 +568,13 @@ discard block |
||
568 | 568 | */ |
569 | 569 | protected function getDocumentByUrl(string $documentId) |
570 | 570 | { |
571 | - $doc = AbstractDocument::getInstance($documentId, $this->settings, true); |
|
571 | + $doc = AbstractDocument::getInstance($documentId, $this->settings, TRUE); |
|
572 | 572 | |
573 | 573 | if (isset($this->settings['multiViewType']) && $doc->tableOfContents[0]['type'] === $this->settings['multiViewType']) { |
574 | 574 | $childDocuments = $doc->tableOfContents[0]['children']; |
575 | 575 | $i = 0; |
576 | 576 | foreach ($childDocuments as $document) { |
577 | - $this->documentArray[] = AbstractDocument::getInstance($document['points'], $this->settings, true); |
|
577 | + $this->documentArray[] = AbstractDocument::getInstance($document['points'], $this->settings, TRUE); |
|
578 | 578 | if (!isset($this->requestData['docPage'][$i]) && isset(explode('#', $document['points'])[1])) { |
579 | 579 | $initPage = explode('#', $document['points'])[1]; |
580 | 580 | $this->requestData['docPage'][$i] = $initPage; |
@@ -587,21 +587,21 @@ discard block |
||
587 | 587 | if (isset($this->requestData['multipleSource']) && is_array($this->requestData['multipleSource'])) { |
588 | 588 | $i = 0; |
589 | 589 | foreach ($this->requestData['multipleSource'] as $location) { |
590 | - $document = AbstractDocument::getInstance($location, $this->settings, true); |
|
591 | - if ($document !== null) { |
|
590 | + $document = AbstractDocument::getInstance($location, $this->settings, TRUE); |
|
591 | + if ($document !== NULL) { |
|
592 | 592 | $this->documentArray['extra_' . $i] = $document; |
593 | 593 | } |
594 | 594 | $i++; |
595 | 595 | } |
596 | 596 | } |
597 | 597 | |
598 | - if ($doc !== null) { |
|
598 | + if ($doc !== NULL) { |
|
599 | 599 | $this->document = GeneralUtility::makeInstance(Document::class); |
600 | 600 | |
601 | 601 | if ($doc->recordId) { |
602 | 602 | // find document from repository by recordId |
603 | 603 | $docFromRepository = $this->documentRepository->findOneByRecordId($doc->recordId); |
604 | - if ($docFromRepository !== null) { |
|
604 | + if ($docFromRepository !== NULL) { |
|
605 | 605 | $this->document = $docFromRepository; |
606 | 606 | } |
607 | 607 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function validate($value): Result |
48 | 48 | { |
49 | 49 | if (!$value instanceof $this->valueClassName) { |
50 | - $this->logger->debug('Value must be an instance of ' . $this->valueClassName . '.'); |
|
50 | + $this->logger->debug('Value must be an instance of '.$this->valueClassName.'.'); |
|
51 | 51 | throw new InvalidArgumentException('Type of value is not valid.', 1723126505626); |
52 | 52 | } |
53 | 53 | return parent::validate($value); |
@@ -29,8 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @access public |
31 | 31 | */ |
32 | -abstract class AbstractDlfValidator extends AbstractValidator |
|
33 | -{ |
|
32 | +abstract class AbstractDlfValidator extends AbstractValidator { |
|
34 | 33 | use LoggerAwareTrait; |
35 | 34 | |
36 | 35 | protected string $valueClassName; |
@@ -38,8 +37,7 @@ discard block |
||
38 | 37 | /** |
39 | 38 | * @param $valueClassName string The class name of the value |
40 | 39 | */ |
41 | - public function __construct(string $valueClassName) |
|
42 | - { |
|
40 | + public function __construct(string $valueClassName) { |
|
43 | 41 | $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); |
44 | 42 | $this->valueClassName = $valueClassName; |
45 | 43 | } |
@@ -22,8 +22,7 @@ |
||
22 | 22 | * @subpackage dlf |
23 | 23 | * @access public |
24 | 24 | */ |
25 | -class AnnotationController extends AbstractController |
|
26 | -{ |
|
25 | +class AnnotationController extends AbstractController { |
|
27 | 26 | /** |
28 | 27 | * The main method of the plugin |
29 | 28 | * |
@@ -34,8 +34,8 @@ |
||
34 | 34 | $this->loadDocument(); |
35 | 35 | |
36 | 36 | if ( |
37 | - $this->document === null |
|
38 | - || $this->document->getCurrentDocument() === null |
|
37 | + $this->document === NULL |
|
38 | + || $this->document->getCurrentDocument() === NULL |
|
39 | 39 | ) { |
40 | 40 | // Quit without doing anything if required variables are not set. |
41 | 41 | } else { |
@@ -31,8 +31,7 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @access public |
33 | 33 | */ |
34 | -class PageViewController extends AbstractController |
|
35 | -{ |
|
34 | +class PageViewController extends AbstractController { |
|
36 | 35 | /** |
37 | 36 | * @access protected |
38 | 37 | * @var array Holds the controls to add to the map |
@@ -258,8 +257,7 @@ discard block |
||
258 | 257 | * @param $page |
259 | 258 | * @return false|int|mixed|string|null |
260 | 259 | */ |
261 | - public function convertMeasureOrPage($document, $measure = null, $page = null) |
|
262 | - { |
|
260 | + public function convertMeasureOrPage($document, $measure = null, $page = null) { |
|
263 | 261 | $return = null; |
264 | 262 | $measure2Page = array_column($document->musicalStructure, 'page'); |
265 | 263 | if ($measure) { |
@@ -370,8 +368,7 @@ discard block |
||
370 | 368 | * |
371 | 369 | * @return array URL and MIME type of fulltext file |
372 | 370 | */ |
373 | - protected function getScore(int $page, MetsDocument $specificDoc = null) |
|
374 | - { |
|
371 | + protected function getScore(int $page, MetsDocument $specificDoc = null) { |
|
375 | 372 | $score = []; |
376 | 373 | $loc = ''; |
377 | 374 | if ($specificDoc) { |
@@ -184,18 +184,18 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | $navigationArray[$i]['next'] = [ |
187 | - 'tx_dlf[docPage][' . $i . ']' => |
|
187 | + 'tx_dlf[docPage]['.$i.']' => |
|
188 | 188 | MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] + 1, 1, $document->numPages, 1) |
189 | 189 | ]; |
190 | 190 | $navigationArray[$i]['prev'] = [ |
191 | - 'tx_dlf[docPage][' . $i . ']' => |
|
191 | + 'tx_dlf[docPage]['.$i.']' => |
|
192 | 192 | MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] - 1, 1, $document->numPages, 1) |
193 | 193 | ]; |
194 | 194 | |
195 | 195 | $navigateAllPageNext = array_merge( |
196 | 196 | $navigateAllPageNext, |
197 | 197 | [ |
198 | - 'tx_dlf[docPage][' . $i . ']' => |
|
198 | + 'tx_dlf[docPage]['.$i.']' => |
|
199 | 199 | MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] + 1, 1, $document->numPages, 1) |
200 | 200 | ] |
201 | 201 | ); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $navigateAllPagePrev = array_merge( |
204 | 204 | $navigateAllPagePrev, |
205 | 205 | [ |
206 | - 'tx_dlf[docPage][' . $i . ']' => |
|
206 | + 'tx_dlf[docPage]['.$i.']' => |
|
207 | 207 | MathUtility::forceIntegerInRange((int) $this->requestData['docPage'][$i] - 1, 1, $document->numPages, 1) |
208 | 208 | ] |
209 | 209 | ); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $navigateAllMeasureNext = array_merge( |
212 | 212 | $navigateAllMeasureNext, |
213 | 213 | [ |
214 | - 'tx_dlf[docMeasure][' . $i . ']' => |
|
214 | + 'tx_dlf[docMeasure]['.$i.']' => |
|
215 | 215 | MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] + 1, 1, $document->numMeasures, 1) |
216 | 216 | ] |
217 | 217 | ); |
@@ -219,19 +219,19 @@ discard block |
||
219 | 219 | $navigateAllMeasurePrev = array_merge( |
220 | 220 | $navigateAllMeasurePrev, |
221 | 221 | [ |
222 | - 'tx_dlf[docMeasure][' . $i . ']' => |
|
222 | + 'tx_dlf[docMeasure]['.$i.']' => |
|
223 | 223 | MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] - 1, 1, $document->numMeasures, 1) |
224 | 224 | ] |
225 | 225 | ); |
226 | 226 | |
227 | 227 | if ($document->numMeasures > 0) { |
228 | 228 | $navigationMeasureArray[$i]['next'] = [ |
229 | - 'tx_dlf[docMeasure][' . $i . ']' => |
|
229 | + 'tx_dlf[docMeasure]['.$i.']' => |
|
230 | 230 | MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] + 1, 1, $document->numMeasures, 1) |
231 | 231 | ]; |
232 | 232 | |
233 | 233 | $navigationMeasureArray[$i]['prev'] = [ |
234 | - 'tx_dlf[docMeasure][' . $i . ']' => |
|
234 | + 'tx_dlf[docMeasure]['.$i.']' => |
|
235 | 235 | MathUtility::forceIntegerInRange((int) $this->requestData['docMeasure'][$i] - 1, 1, $document->numMeasures, 1) |
236 | 236 | ]; |
237 | 237 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | } |
286 | 286 | $params = array_merge( |
287 | 287 | ['tx_dlf' => $this->requestData], |
288 | - ['tx_dlf[multipleSource][' . $nextMultipleSourceKey . ']' => $formAddDocument->getLocation()], |
|
288 | + ['tx_dlf[multipleSource]['.$nextMultipleSourceKey.']' => $formAddDocument->getLocation()], |
|
289 | 289 | ['tx_dlf[multiview]' => 1] |
290 | 290 | ); |
291 | 291 | $uriBuilder = $this->uriBuilder; |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | // build link for each measure |
334 | 334 | $params = [ |
335 | 335 | 'tx_dlf' => $this->requestData, |
336 | - 'tx_dlf[docMeasure][' . $docNumber . ']' => $i |
|
336 | + 'tx_dlf[docMeasure]['.$docNumber.']' => $i |
|
337 | 337 | ]; |
338 | 338 | } else { |
339 | 339 | // build link for each measure |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | } |
418 | 418 | |
419 | 419 | if (empty($score)) { |
420 | - $this->logger->notice('No score file found for page "' . $page . '" in fileGrps "' . ($this->extConf['files']['fileGrpScore'] ?? '') . '"'); |
|
420 | + $this->logger->notice('No score file found for page "'.$page.'" in fileGrps "'.($this->extConf['files']['fileGrpScore'] ?? '').'"'); |
|
421 | 421 | } |
422 | 422 | return $score; |
423 | 423 | } |
@@ -448,11 +448,11 @@ discard block |
||
448 | 448 | $fulltext['mimetype'] = $file['mimeType']; |
449 | 449 | break; |
450 | 450 | } else { |
451 | - $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"'); |
|
451 | + $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"'); |
|
452 | 452 | } |
453 | 453 | } |
454 | 454 | if (empty($fulltext)) { |
455 | - $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpFulltext'] . '"'); |
|
455 | + $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpFulltext'].'"'); |
|
456 | 456 | } |
457 | 457 | return $fulltext; |
458 | 458 | } |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | 'measureIdLinks' => $docMeasures['measureLinks'] |
513 | 513 | ]; |
514 | 514 | |
515 | - $jsViewer .= 'tx_dlf_viewer[' . $i . '] = new dlfViewer(' . json_encode($viewer) . '); |
|
515 | + $jsViewer .= 'tx_dlf_viewer['.$i.'] = new dlfViewer('.json_encode($viewer).'); |
|
516 | 516 | '; |
517 | 517 | $i++; |
518 | 518 | } |
@@ -521,8 +521,8 @@ discard block |
||
521 | 521 | // Viewer configuration. |
522 | 522 | $viewerConfiguration = '$(document).ready(function() { |
523 | 523 | if (dlfUtils.exists(dlfViewer)) { |
524 | - ' . $jsViewer . ' |
|
525 | - viewerCount = ' . ($i - 1) . '; |
|
524 | + ' . $jsViewer.' |
|
525 | + viewerCount = ' . ($i - 1).'; |
|
526 | 526 | } |
527 | 527 | });'; |
528 | 528 | } else { |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | // Viewer configuration. |
553 | 553 | $viewerConfiguration = '$(document).ready(function() { |
554 | 554 | if (dlfUtils.exists(dlfViewer)) { |
555 | - tx_dlf_viewer = new dlfViewer(' . json_encode($viewer) . '); |
|
555 | + tx_dlf_viewer = new dlfViewer(' . json_encode($viewer).'); |
|
556 | 556 | } |
557 | 557 | });'; |
558 | 558 | } |
@@ -645,12 +645,12 @@ discard block |
||
645 | 645 | } |
646 | 646 | break; |
647 | 647 | } else { |
648 | - $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"'); |
|
648 | + $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"'); |
|
649 | 649 | } |
650 | 650 | } |
651 | 651 | |
652 | 652 | if (empty($image)) { |
653 | - $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpImages'] . '"'); |
|
653 | + $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpImages'].'"'); |
|
654 | 654 | } |
655 | 655 | |
656 | 656 | return $image; |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | |
147 | 147 | $this->view->assign('docCount', is_array($this->documentArray) ? count($this->documentArray) : 0); |
148 | 148 | $this->view->assign('docArray', $this->documentArray); |
149 | - $this->view->assign('docPage', $this->requestData['docPage'] ?? null); |
|
149 | + $this->view->assign('docPage', $this->requestData['docPage'] ?? NULL); |
|
150 | 150 | $this->view->assign('docType', $this->document->getCurrentDocument()->tableOfContents[0]['type']); |
151 | 151 | |
152 | - $this->view->assign('multiview', $this->requestData['multiview'] ?? null); |
|
153 | - if ($this->requestData['multiview'] ?? false) { |
|
152 | + $this->view->assign('multiview', $this->requestData['multiview'] ?? NULL); |
|
153 | + if ($this->requestData['multiview'] ?? FALSE) { |
|
154 | 154 | $this->multipageNavigation(); |
155 | 155 | } |
156 | 156 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | // convert either page or measure if requestData exists |
180 | 180 | if ($this->requestData['docPage'][$i] && empty($this->requestData['docMeasure'][$i])) { |
181 | 181 | // convert document page information to measure count information |
182 | - $this->requestData['docMeasure'][$i] = $this->convertMeasureOrPage($document, null, $this->requestData['docPage'][$i]); |
|
182 | + $this->requestData['docMeasure'][$i] = $this->convertMeasureOrPage($document, NULL, $this->requestData['docPage'][$i]); |
|
183 | 183 | |
184 | 184 | } elseif ((empty($this->requestData['docPage'][$i]) || $this->requestData['docPage'][$i] === 1) && $this->requestData['docMeasure'][$i]) { |
185 | 185 | $this->requestData['docPage'][$i] = $this->convertMeasureOrPage($document, $this->requestData['docMeasure'][$i]); |
@@ -261,9 +261,9 @@ discard block |
||
261 | 261 | * @param $page |
262 | 262 | * @return false|int|mixed|string|null |
263 | 263 | */ |
264 | - public function convertMeasureOrPage($document, $measure = null, $page = null) |
|
264 | + public function convertMeasureOrPage($document, $measure = NULL, $page = NULL) |
|
265 | 265 | { |
266 | - $return = null; |
|
266 | + $return = NULL; |
|
267 | 267 | $measure2Page = array_column($document->musicalStructure, 'page'); |
268 | 268 | if ($measure) { |
269 | 269 | $return = $measure2Page[$measure]; |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * @param int|null $docNumber |
310 | 310 | * @return array |
311 | 311 | */ |
312 | - protected function getMeasures(int $page, MetsDocument $specificDoc = null, $docNumber = null): array |
|
312 | + protected function getMeasures(int $page, MetsDocument $specificDoc = NULL, $docNumber = NULL): array |
|
313 | 313 | { |
314 | 314 | if ($specificDoc) { |
315 | 315 | $doc = $specificDoc; |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * |
374 | 374 | * @return array URL and MIME type of fulltext file |
375 | 375 | */ |
376 | - protected function getScore(int $page, MetsDocument $specificDoc = null) |
|
376 | + protected function getScore(int $page, MetsDocument $specificDoc = NULL) |
|
377 | 377 | { |
378 | 378 | $score = []; |
379 | 379 | $loc = ''; |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | // Configure @action URL for form. |
404 | 404 | $uri = $this->uriBuilder->reset() |
405 | 405 | ->setTargetPageUid($this->pageUid) |
406 | - ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false) |
|
406 | + ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE) |
|
407 | 407 | ->setArguments( |
408 | 408 | [ |
409 | 409 | 'eID' => 'tx_dlf_pageview_proxy', |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $jsViewer = 'tx_dlf_viewer = [];'; |
473 | 473 | $i = 0; |
474 | 474 | foreach ($this->documentArray as $document) { |
475 | - if ($document !== null) { |
|
475 | + if ($document !== NULL) { |
|
476 | 476 | $docPage = $this->requestData['docPage'][$i]; |
477 | 477 | $docImage = []; |
478 | 478 | $docFulltext = []; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $docPage = $measure2Page[$this->requestData['docMeasure'][$i]]; |
487 | 487 | } |
488 | 488 | } |
489 | - if ($docPage == null) { |
|
489 | + if ($docPage == NULL) { |
|
490 | 490 | $docPage = 1; |
491 | 491 | } |
492 | 492 | $docImage[0] = $this->getImage($docPage, $document); |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | $docPage = $this->requestData['page'] ?? 0; |
533 | 533 | |
534 | 534 | $docMeasures = $this->getMeasures($docPage); |
535 | - if ($this->requestData['measure'] ?? false) { |
|
535 | + if ($this->requestData['measure'] ?? FALSE) { |
|
536 | 536 | $currentMeasureId = $docMeasures['measureCounterToMeasureId'][$this->requestData['measure']]; |
537 | 537 | } |
538 | 538 | |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | if ($iiif instanceof ManifestInterface) { |
578 | 578 | $canvas = $iiif->getContainedResourceById($canvasId); |
579 | 579 | /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */ |
580 | - if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) { |
|
580 | + if ($canvas != NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) { |
|
581 | 581 | $annotationContainers = []; |
582 | 582 | /* |
583 | 583 | * TODO Analyzing the annotations on the server side requires loading the annotation lists / pages |
@@ -587,11 +587,11 @@ discard block |
||
587 | 587 | * On the other hand, server connections are potentially better than client connections. Downloading annotation lists |
588 | 588 | */ |
589 | 589 | foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) { |
590 | - if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) { |
|
590 | + if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) { |
|
591 | 591 | foreach ($textAnnotations as $annotation) { |
592 | 592 | if ( |
593 | 593 | $annotation->getBody()->getFormat() == 'text/plain' |
594 | - && $annotation->getBody()->getChars() != null |
|
594 | + && $annotation->getBody()->getChars() != NULL |
|
595 | 595 | ) { |
596 | 596 | $annotationListData = []; |
597 | 597 | $annotationListData['uri'] = $annotationContainer->getId(); |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | * |
628 | 628 | * @return array URL and MIME type of image file |
629 | 629 | */ |
630 | - protected function getImage(int $page, MetsDocument $specificDoc = null): array |
|
630 | + protected function getImage(int $page, MetsDocument $specificDoc = NULL): array |
|
631 | 631 | { |
632 | 632 | $image = []; |
633 | 633 | // Get @USE value of METS fileGrp. |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | } |
678 | 678 | |
679 | 679 | // Get the files for the specified file group |
680 | - $files = $physicalStructureInfo['files'] ?? null; |
|
680 | + $files = $physicalStructureInfo['files'] ?? NULL; |
|
681 | 681 | if ($files && !empty($files[$fileGrpImages])) { |
682 | 682 | // Get the file info for the specified file group |
683 | 683 | if ($specificDoc) { |
@@ -687,6 +687,6 @@ discard block |
||
687 | 687 | } |
688 | 688 | } |
689 | 689 | |
690 | - return null; |
|
690 | + return NULL; |
|
691 | 691 | } |
692 | 692 | } |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | * @property int $limit |
17 | 17 | * @property int $offset |
18 | 18 | */ |
19 | -class SolrSearchQuery extends Query |
|
20 | -{ |
|
19 | +class SolrSearchQuery extends Query { |
|
21 | 20 | /** |
22 | 21 | * @access private |
23 | 22 | * @var SolrSearch |
@@ -33,8 +32,7 @@ discard block |
||
33 | 32 | * |
34 | 33 | * @return void |
35 | 34 | */ |
36 | - public function __construct($solrSearch) |
|
37 | - { |
|
35 | + public function __construct($solrSearch) { |
|
38 | 36 | $this->solrSearch = $solrSearch; |
39 | 37 | |
40 | 38 | $this->offset = 0; |
@@ -52,8 +50,7 @@ discard block |
||
52 | 50 | */ |
53 | 51 | // TODO: Return type (array) of method SolrSearchQuery::execute() should be compatible with return type (iterable<object>&TYPO3\CMS\Extbase\Persistence\QueryResultInterface) of method TYPO3\CMS\Extbase\Persistence\QueryInterface::execute() |
54 | 52 | // @phpstan-ignore-next-line |
55 | - public function execute($returnRawQueryResult = false) |
|
56 | - { |
|
53 | + public function execute($returnRawQueryResult = false) { |
|
57 | 54 | $this->solrSearch->submit($this->offset, $this->limit); |
58 | 55 | |
59 | 56 | // solrSearch now only contains the results in range, indexed in [0, n) |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | // TODO: Return type (array) of method SolrSearchQuery::execute() should be compatible with return type (iterable<object>&TYPO3\CMS\Extbase\Persistence\QueryResultInterface) of method TYPO3\CMS\Extbase\Persistence\QueryInterface::execute() |
54 | 54 | // @phpstan-ignore-next-line |
55 | - public function execute($returnRawQueryResult = false) |
|
55 | + public function execute($returnRawQueryResult = FALSE) |
|
56 | 56 | { |
57 | 57 | $this->solrSearch->submit($this->offset, $this->limit); |
58 | 58 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | 'navigationComponentId' => '@typo3/backend/page-tree/page-tree-element', |
27 | 27 | 'controllerActions' => [ |
28 | 28 | \Kitodo\Dlf\Controller\Backend\NewTenantController::class => [ |
29 | - 'index','error','addFormat','addMetadata','addSolrCore','addStructure' |
|
29 | + 'index', 'error', 'addFormat', 'addMetadata', 'addSolrCore', 'addStructure' |
|
30 | 30 | ], |
31 | 31 | ], |
32 | 32 | ], |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration(); |
97 | 97 | |
98 | 98 | if ($this->disableJsonWrappedResponse) { |
99 | - $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) { |
|
99 | + $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) { |
|
100 | 100 | return $ext !== 'Resources/Core/Functional/Extensions/json_response'; |
101 | 101 | }); |
102 | 102 | } |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | |
109 | 109 | $this->persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class); |
110 | 110 | |
111 | - $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/'; |
|
111 | + $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/'; |
|
112 | 112 | $this->httpClient = new HttpClient([ |
113 | - 'base_uri' => $this->baseUrl . 'index.php', |
|
113 | + 'base_uri' => $this->baseUrl.'index.php', |
|
114 | 114 | 'http_errors' => false, |
115 | 115 | ]); |
116 | 116 | |
@@ -169,13 +169,13 @@ discard block |
||
169 | 169 | |
170 | 170 | protected function addSiteConfig($identifier) |
171 | 171 | { |
172 | - $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml'); |
|
172 | + $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml'); |
|
173 | 173 | $siteConfig['base'] = $this->baseUrl; |
174 | 174 | $siteConfig['languages'][0]['base'] = $this->baseUrl; |
175 | 175 | |
176 | - $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier; |
|
176 | + $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier; |
|
177 | 177 | @mkdir($siteConfigPath, 0775, true); |
178 | - file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig)); |
|
178 | + file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig)); |
|
179 | 179 | |
180 | 180 | // refresh site cache (otherwise site config is not found) |
181 | 181 | $finder = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Site\SiteFinder::class); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $jsonDocuments = json_decode(file_get_contents($path), true); |
198 | 198 | |
199 | 199 | $updateQuery = $solr->service->createUpdate(); |
200 | - $documents = array_map(function ($jsonDoc) use ($updateQuery) { |
|
200 | + $documents = array_map(function($jsonDoc) use ($updateQuery) { |
|
201 | 201 | $document = $updateQuery->createDocument(); |
202 | 202 | foreach ($jsonDoc as $key => $value) { |
203 | 203 | $document->setField($key, $value); |
@@ -89,8 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected $httpClient; |
91 | 91 | |
92 | - public function __construct() |
|
93 | - { |
|
92 | + public function __construct() { |
|
94 | 93 | parent::__construct(); |
95 | 94 | |
96 | 95 | $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration(); |
@@ -117,8 +116,7 @@ discard block |
||
117 | 116 | $this->addSiteConfig('dlf-testing'); |
118 | 117 | } |
119 | 118 | |
120 | - protected function getDlfConfiguration() |
|
121 | - { |
|
119 | + protected function getDlfConfiguration() { |
|
122 | 120 | $dotenv = Dotenv::createImmutable('/home/runner/work/kitodo-presentation/kitodo-presentation/Build/Test/', 'test.env'); |
123 | 121 | $dotenv->load(); |
124 | 122 | |
@@ -167,8 +165,7 @@ discard block |
||
167 | 165 | ]; |
168 | 166 | } |
169 | 167 | |
170 | - protected function addSiteConfig($identifier) |
|
171 | - { |
|
168 | + protected function addSiteConfig($identifier) { |
|
172 | 169 | $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml'); |
173 | 170 | $siteConfig['base'] = $this->baseUrl; |
174 | 171 | $siteConfig['languages'][0]['base'] = $this->baseUrl; |
@@ -182,8 +179,7 @@ discard block |
||
182 | 179 | $finder->getAllSites(false); // useCache = false |
183 | 180 | } |
184 | 181 | |
185 | - protected function initializeRepository(string $className, int $storagePid) |
|
186 | - { |
|
182 | + protected function initializeRepository(string $className, int $storagePid) { |
|
187 | 183 | $repository = GeneralUtility::makeInstance($className); |
188 | 184 | $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); |
189 | 185 | $querySettings->setStoragePageIds([$storagePid]); |
@@ -192,8 +188,7 @@ discard block |
||
192 | 188 | return $repository; |
193 | 189 | } |
194 | 190 | |
195 | - protected function importSolrDocuments(Solr $solr, string $path) |
|
196 | - { |
|
191 | + protected function importSolrDocuments(Solr $solr, string $path) { |
|
197 | 192 | $jsonDocuments = json_decode(file_get_contents($path), true); |
198 | 193 | |
199 | 194 | $updateQuery = $solr->service->createUpdate(); |
@@ -212,8 +207,7 @@ discard block |
||
212 | 207 | $solr->service->update($updateQuery); |
213 | 208 | } |
214 | 209 | |
215 | - protected function initLanguageService(string $locale) |
|
216 | - { |
|
210 | + protected function initLanguageService(string $locale) { |
|
217 | 211 | // create mock backend user and set language |
218 | 212 | // which is loaded by LanguageServiceFactory as default value in backend mode |
219 | 213 | $backendUser = GeneralUtility::makeInstance(BackendUserAuthentication::class); |
@@ -224,8 +218,7 @@ discard block |
||
224 | 218 | /** |
225 | 219 | * Assert that $sub is recursively contained within $super. |
226 | 220 | */ |
227 | - protected function assertArrayMatches(array $sub, array $super, string $message = '') |
|
228 | - { |
|
221 | + protected function assertArrayMatches(array $sub, array $super, string $message = '') { |
|
229 | 222 | self::assertEquals($sub, ArrayUtility::intersectRecursive($super, $sub), $message); |
230 | 223 | } |
231 | 224 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ], |
53 | 53 | 'FE' => [ |
54 | 54 | 'cacheHash' => [ |
55 | - 'enforceValidation' => false, |
|
55 | + 'enforceValidation' => FALSE, |
|
56 | 56 | ], |
57 | 57 | ], |
58 | 58 | 'DB' => [ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @var bool |
74 | 74 | */ |
75 | - protected $disableJsonWrappedResponse = false; |
|
75 | + protected $disableJsonWrappedResponse = FALSE; |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * @var PersistenceManager |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/'; |
112 | 112 | $this->httpClient = new HttpClient([ |
113 | 113 | 'base_uri' => $this->baseUrl . 'index.php', |
114 | - 'http_errors' => false, |
|
114 | + 'http_errors' => FALSE, |
|
115 | 115 | ]); |
116 | 116 | |
117 | 117 | $this->addSiteConfig('dlf-testing'); |
@@ -174,12 +174,12 @@ discard block |
||
174 | 174 | $siteConfig['languages'][0]['base'] = $this->baseUrl; |
175 | 175 | |
176 | 176 | $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier; |
177 | - @mkdir($siteConfigPath, 0775, true); |
|
177 | + @mkdir($siteConfigPath, 0775, TRUE); |
|
178 | 178 | file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig)); |
179 | 179 | |
180 | 180 | // refresh site cache (otherwise site config is not found) |
181 | 181 | $finder = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Site\SiteFinder::class); |
182 | - $finder->getAllSites(false); // useCache = false |
|
182 | + $finder->getAllSites(FALSE); // useCache = false |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | protected function initializeRepository(string $className, int $storagePid) |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | protected function importSolrDocuments(Solr $solr, string $path) |
196 | 196 | { |
197 | - $jsonDocuments = json_decode(file_get_contents($path), true); |
|
197 | + $jsonDocuments = json_decode(file_get_contents($path), TRUE); |
|
198 | 198 | |
199 | 199 | $updateQuery = $solr->service->createUpdate(); |
200 | 200 | $documents = array_map(function ($jsonDoc) use ($updateQuery) { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
26 | 26 | 'Dlf', |
27 | 27 | 'Annotation', |
28 | - $pluginsLabel . 'annotation.title', |
|
28 | + $pluginsLabel.'annotation.title', |
|
29 | 29 | ); |
30 | 30 | |
31 | 31 | // Plugin "audioplayer". |
@@ -36,14 +36,14 @@ discard block |
||
36 | 36 | |
37 | 37 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
38 | 38 | $plugin, |
39 | - $flexFormsPathPrefix . 'AudioPlayer.xml' |
|
39 | + $flexFormsPathPrefix.'AudioPlayer.xml' |
|
40 | 40 | ); |
41 | 41 | |
42 | 42 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
43 | 43 | 'Dlf', |
44 | 44 | 'AudioPlayer', |
45 | - $pluginsLabel . 'audioplayer.title', |
|
46 | - $iconsDirectory . 'tx-dlf-audioplayer.svg' |
|
45 | + $pluginsLabel.'audioplayer.title', |
|
46 | + $iconsDirectory.'tx-dlf-audioplayer.svg' |
|
47 | 47 | ); |
48 | 48 | |
49 | 49 | // Plugin "basket". |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | |
55 | 55 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
56 | 56 | $plugin, |
57 | - $flexFormsPathPrefix . 'Basket.xml' |
|
57 | + $flexFormsPathPrefix.'Basket.xml' |
|
58 | 58 | ); |
59 | 59 | |
60 | 60 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
61 | 61 | 'Dlf', |
62 | 62 | 'Basket', |
63 | - $pluginsLabel . 'basket.title', |
|
64 | - $iconsDirectory . 'tx-dlf-basket.svg' |
|
63 | + $pluginsLabel.'basket.title', |
|
64 | + $iconsDirectory.'tx-dlf-basket.svg' |
|
65 | 65 | ); |
66 | 66 | |
67 | 67 | // Plugin "calendar". |
@@ -72,14 +72,14 @@ discard block |
||
72 | 72 | |
73 | 73 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
74 | 74 | $plugin, |
75 | - $flexFormsPathPrefix . 'Calendar.xml' |
|
75 | + $flexFormsPathPrefix.'Calendar.xml' |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
79 | 79 | 'Dlf', |
80 | 80 | 'Calendar', |
81 | - $pluginsLabel . 'calendar.title', |
|
82 | - $iconsDirectory . 'tx-dlf-calendar.svg' |
|
81 | + $pluginsLabel.'calendar.title', |
|
82 | + $iconsDirectory.'tx-dlf-calendar.svg' |
|
83 | 83 | ); |
84 | 84 | |
85 | 85 | // Plugin "collection". |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | |
91 | 91 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
92 | 92 | $plugin, |
93 | - $flexFormsPathPrefix . 'Collection.xml' |
|
93 | + $flexFormsPathPrefix.'Collection.xml' |
|
94 | 94 | ); |
95 | 95 | |
96 | 96 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
97 | 97 | 'Dlf', |
98 | 98 | 'Collection', |
99 | - $pluginsLabel . 'collection.title', |
|
100 | - $iconsDirectory . 'tx-dlf-collection.svg' |
|
99 | + $pluginsLabel.'collection.title', |
|
100 | + $iconsDirectory.'tx-dlf-collection.svg' |
|
101 | 101 | ); |
102 | 102 | |
103 | 103 | // Plugin "embedded3dviewer". |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | |
109 | 109 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
110 | 110 | 'dlf_embedded3dviewer', |
111 | - $flexFormsPathPrefix . 'Embedded3dViewer.xml' |
|
111 | + $flexFormsPathPrefix.'Embedded3dViewer.xml' |
|
112 | 112 | ); |
113 | 113 | |
114 | 114 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
115 | 115 | 'Dlf', |
116 | 116 | 'Embedded3dViewer', |
117 | - $pluginsLabel . 'embedded3dviewer.title', |
|
118 | - $iconsDirectory . 'tx-dlf-embedded3dviewer.svg' |
|
117 | + $pluginsLabel.'embedded3dviewer.title', |
|
118 | + $iconsDirectory.'tx-dlf-embedded3dviewer.svg' |
|
119 | 119 | ); |
120 | 120 | |
121 | 121 | // Plugin "feeds". |
@@ -126,14 +126,14 @@ discard block |
||
126 | 126 | |
127 | 127 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
128 | 128 | $plugin, |
129 | - $flexFormsPathPrefix . 'Feeds.xml' |
|
129 | + $flexFormsPathPrefix.'Feeds.xml' |
|
130 | 130 | ); |
131 | 131 | |
132 | 132 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
133 | 133 | 'Dlf', |
134 | 134 | 'Feeds', |
135 | - $pluginsLabel . 'feeds.title', |
|
136 | - $iconsDirectory . 'tx-dlf-feeds.svg' |
|
135 | + $pluginsLabel.'feeds.title', |
|
136 | + $iconsDirectory.'tx-dlf-feeds.svg' |
|
137 | 137 | ); |
138 | 138 | |
139 | 139 | // Plugin "listview". |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | |
145 | 145 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
146 | 146 | $plugin, |
147 | - $flexFormsPathPrefix . 'ListView.xml' |
|
147 | + $flexFormsPathPrefix.'ListView.xml' |
|
148 | 148 | ); |
149 | 149 | |
150 | 150 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
151 | 151 | 'Dlf', |
152 | 152 | 'ListView', |
153 | - $pluginsLabel . 'listview.title', |
|
154 | - $iconsDirectory . 'tx-dlf-listview.svg' |
|
153 | + $pluginsLabel.'listview.title', |
|
154 | + $iconsDirectory.'tx-dlf-listview.svg' |
|
155 | 155 | ); |
156 | 156 | |
157 | 157 | // Plugin "metadata". |
@@ -161,14 +161,14 @@ discard block |
||
161 | 161 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$plugin] = $addList; |
162 | 162 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
163 | 163 | $plugin, |
164 | - $flexFormsPathPrefix . 'Metadata.xml' |
|
164 | + $flexFormsPathPrefix.'Metadata.xml' |
|
165 | 165 | ); |
166 | 166 | |
167 | 167 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
168 | 168 | 'Dlf', |
169 | 169 | 'Metadata', |
170 | - $pluginsLabel . 'metadata.title', |
|
171 | - $iconsDirectory . 'tx-dlf-metadata.svg' |
|
170 | + $pluginsLabel.'metadata.title', |
|
171 | + $iconsDirectory.'tx-dlf-metadata.svg' |
|
172 | 172 | ); |
173 | 173 | |
174 | 174 | // Plugin "navigation". |
@@ -179,14 +179,14 @@ discard block |
||
179 | 179 | |
180 | 180 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
181 | 181 | $plugin, |
182 | - $flexFormsPathPrefix . 'Navigation.xml' |
|
182 | + $flexFormsPathPrefix.'Navigation.xml' |
|
183 | 183 | ); |
184 | 184 | |
185 | 185 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
186 | 186 | 'Dlf', |
187 | 187 | 'Navigation', |
188 | - $pluginsLabel . 'navigation.title', |
|
189 | - $iconsDirectory . 'tx-dlf-navigation.svg' |
|
188 | + $pluginsLabel.'navigation.title', |
|
189 | + $iconsDirectory.'tx-dlf-navigation.svg' |
|
190 | 190 | ); |
191 | 191 | |
192 | 192 | // Plugin "oaipmh". |
@@ -197,14 +197,14 @@ discard block |
||
197 | 197 | |
198 | 198 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
199 | 199 | $plugin, |
200 | - $flexFormsPathPrefix . 'OaiPmh.xml' |
|
200 | + $flexFormsPathPrefix.'OaiPmh.xml' |
|
201 | 201 | ); |
202 | 202 | |
203 | 203 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
204 | 204 | 'Dlf', |
205 | 205 | 'OaiPmh', |
206 | - $pluginsLabel . 'oaipmh.title', |
|
207 | - $iconsDirectory . 'tx-dlf-oaipmh.svg' |
|
206 | + $pluginsLabel.'oaipmh.title', |
|
207 | + $iconsDirectory.'tx-dlf-oaipmh.svg' |
|
208 | 208 | ); |
209 | 209 | |
210 | 210 | // Plugin "pagegrid". |
@@ -214,14 +214,14 @@ discard block |
||
214 | 214 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$plugin] = $addList; |
215 | 215 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
216 | 216 | $plugin, |
217 | - $flexFormsPathPrefix . 'PageGrid.xml' |
|
217 | + $flexFormsPathPrefix.'PageGrid.xml' |
|
218 | 218 | ); |
219 | 219 | |
220 | 220 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
221 | 221 | 'Dlf', |
222 | 222 | 'PageGrid', |
223 | - $pluginsLabel . 'pagegrid.title', |
|
224 | - $iconsDirectory . 'tx-dlf-pagegrid.svg' |
|
223 | + $pluginsLabel.'pagegrid.title', |
|
224 | + $iconsDirectory.'tx-dlf-pagegrid.svg' |
|
225 | 225 | ); |
226 | 226 | |
227 | 227 | // Plugin "pageview". |
@@ -231,14 +231,14 @@ discard block |
||
231 | 231 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$plugin] = $addList; |
232 | 232 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
233 | 233 | $plugin, |
234 | - $flexFormsPathPrefix . 'PageView.xml' |
|
234 | + $flexFormsPathPrefix.'PageView.xml' |
|
235 | 235 | ); |
236 | 236 | |
237 | 237 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
238 | 238 | 'Dlf', |
239 | 239 | 'PageView', |
240 | - $pluginsLabel . 'plugins.pageview.title', |
|
241 | - $iconsDirectory . 'tx-dlf-pageview.svg' |
|
240 | + $pluginsLabel.'plugins.pageview.title', |
|
241 | + $iconsDirectory.'tx-dlf-pageview.svg' |
|
242 | 242 | ); |
243 | 243 | |
244 | 244 | // Plugin "search". |
@@ -249,14 +249,14 @@ discard block |
||
249 | 249 | |
250 | 250 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
251 | 251 | $plugin, |
252 | - $flexFormsPathPrefix . 'Search.xml' |
|
252 | + $flexFormsPathPrefix.'Search.xml' |
|
253 | 253 | ); |
254 | 254 | |
255 | 255 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
256 | 256 | 'Dlf', |
257 | 257 | 'Search', |
258 | - $pluginsLabel . 'search.title', |
|
259 | - $iconsDirectory . 'tx-dlf-search.svg' |
|
258 | + $pluginsLabel.'search.title', |
|
259 | + $iconsDirectory.'tx-dlf-search.svg' |
|
260 | 260 | ); |
261 | 261 | |
262 | 262 | // Plugin "statistics". |
@@ -267,14 +267,14 @@ discard block |
||
267 | 267 | |
268 | 268 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
269 | 269 | $plugin, |
270 | - $flexFormsPathPrefix . 'Statistics.xml' |
|
270 | + $flexFormsPathPrefix.'Statistics.xml' |
|
271 | 271 | ); |
272 | 272 | |
273 | 273 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
274 | 274 | 'Dlf', |
275 | 275 | 'Statistics', |
276 | - $pluginsLabel . 'statistics.title', |
|
277 | - $iconsDirectory . 'tx-dlf-statistics.svg' |
|
276 | + $pluginsLabel.'statistics.title', |
|
277 | + $iconsDirectory.'tx-dlf-statistics.svg' |
|
278 | 278 | ); |
279 | 279 | |
280 | 280 | // Plugin "tableofcontents". |
@@ -285,14 +285,14 @@ discard block |
||
285 | 285 | |
286 | 286 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
287 | 287 | $plugin, |
288 | - $flexFormsPathPrefix . 'TableOfContents.xml' |
|
288 | + $flexFormsPathPrefix.'TableOfContents.xml' |
|
289 | 289 | ); |
290 | 290 | |
291 | 291 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
292 | 292 | 'Dlf', |
293 | 293 | 'TableOfContents', |
294 | - $pluginsLabel . 'tableofcontents.title', |
|
295 | - $iconsDirectory . 'tx-dlf-tableofcontents.svg' |
|
294 | + $pluginsLabel.'tableofcontents.title', |
|
295 | + $iconsDirectory.'tx-dlf-tableofcontents.svg' |
|
296 | 296 | ); |
297 | 297 | |
298 | 298 | // Plugin "toolbox". |
@@ -302,12 +302,12 @@ discard block |
||
302 | 302 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$plugin] = $addList; |
303 | 303 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( |
304 | 304 | $plugin, |
305 | - $flexFormsPathPrefix . 'Toolbox.xml' |
|
305 | + $flexFormsPathPrefix.'Toolbox.xml' |
|
306 | 306 | ); |
307 | 307 | |
308 | 308 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
309 | 309 | 'Dlf', |
310 | 310 | 'Toolbox', |
311 | - $pluginsLabel . 'toolbox.title', |
|
312 | - $iconsDirectory . 'tx-dlf-toolbox.svg' |
|
311 | + $pluginsLabel.'toolbox.title', |
|
312 | + $iconsDirectory.'tx-dlf-toolbox.svg' |
|
313 | 313 | ); |