@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | array_unshift($metadata, $data); |
| 156 | 156 | } |
| 157 | 157 | if (empty($metadata)) { |
| 158 | - $this->logger->warning('No metadata found for document with UID ' . $this->document->getUid()); |
|
| 158 | + $this->logger->warning('No metadata found for document with UID '.$this->document->getUid()); |
|
| 159 | 159 | return ''; |
| 160 | 160 | } |
| 161 | 161 | ksort($metadata); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | if (empty($metadataValue) && $this->settings['getTitle'] && $this->document->getDoc()->parentId) { |
| 256 | 256 | $superiorTitle = Doc::getTitle($this->document->getPartof(), true); |
| 257 | 257 | if (!empty($superiorTitle)) { |
| 258 | - $metadataArray[$i][$metadataName] = ['[' . $superiorTitle . ']']; |
|
| 258 | + $metadataArray[$i][$metadataName] = ['['.$superiorTitle.']']; |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | if (!empty($metadataValue)) { |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | // Load current document. |
| 81 | 81 | $this->loadDocument($this->requestData); |
| 82 | 82 | if ( |
| 83 | - $this->document === null |
|
| 84 | - || $this->document->getDoc() === null |
|
| 83 | + $this->document === NULL |
|
| 84 | + || $this->document->getDoc() === NULL |
|
| 85 | 85 | ) { |
| 86 | 86 | // Quit without doing anything if required variables are not set. |
| 87 | 87 | return ''; |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * |
| 181 | 181 | * @return string The metadata array ready for output |
| 182 | 182 | */ |
| 183 | - protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) |
|
| 183 | + protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = FALSE) |
|
| 184 | 184 | { |
| 185 | 185 | if ($useOriginalIiifManifestMetadata) { |
| 186 | 186 | $iiifData = []; |
@@ -198,14 +198,14 @@ discard block |
||
| 198 | 198 | $iiifData[$key] = [ |
| 199 | 199 | 'label' => $key, |
| 200 | 200 | 'value' => $group, |
| 201 | - 'buildUrl' => true, |
|
| 201 | + 'buildUrl' => TRUE, |
|
| 202 | 202 | ]; |
| 203 | 203 | } else { |
| 204 | 204 | // Data output |
| 205 | 205 | $iiifData[$key] = [ |
| 206 | 206 | 'label' => $key, |
| 207 | 207 | 'value' => $group, |
| 208 | - 'buildUrl' => false, |
|
| 208 | + 'buildUrl' => FALSE, |
|
| 209 | 209 | ]; |
| 210 | 210 | } |
| 211 | 211 | } else { |
@@ -222,18 +222,18 @@ discard block |
||
| 222 | 222 | $iiifData[$key]['data'][] = [ |
| 223 | 223 | 'label' => $nolabel ? '' : $label, |
| 224 | 224 | 'value' => $value, |
| 225 | - 'buildUrl' => true, |
|
| 225 | + 'buildUrl' => TRUE, |
|
| 226 | 226 | ]; |
| 227 | 227 | } else { |
| 228 | 228 | $iiifData[$key]['data'][] = [ |
| 229 | 229 | 'label' => $label, |
| 230 | 230 | 'value' => $value, |
| 231 | - 'buildUrl' => false, |
|
| 231 | + 'buildUrl' => FALSE, |
|
| 232 | 232 | ]; |
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | - $this->view->assign('useIiif', true); |
|
| 236 | + $this->view->assign('useIiif', TRUE); |
|
| 237 | 237 | $this->view->assign('iiifData', $iiifData); |
| 238 | 238 | } |
| 239 | 239 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | if ($metadataName == 'title') { |
| 254 | 254 | // Get title of parent document if needed. |
| 255 | 255 | if (empty($metadataValue) && $this->settings['getTitle'] && $this->document->getDoc()->parentId) { |
| 256 | - $superiorTitle = Doc::getTitle($this->document->getPartof(), true); |
|
| 256 | + $superiorTitle = Doc::getTitle($this->document->getPartof(), TRUE); |
|
| 257 | 257 | if (!empty($superiorTitle)) { |
| 258 | 258 | $metadataArray[$i][$metadataName] = ['[' . $superiorTitle . ']']; |
| 259 | 259 | } |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | * @subpackage dlf |
| 30 | 30 | * @access public |
| 31 | 31 | */ |
| 32 | -class MetadataController extends AbstractController |
|
| 33 | -{ |
|
| 32 | +class MetadataController extends AbstractController { |
|
| 34 | 33 | /** |
| 35 | 34 | * @var CollectionRepository |
| 36 | 35 | */ |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | /** |
| 40 | 39 | * @param CollectionRepository $collectionRepository |
| 41 | 40 | */ |
| 42 | - public function injectCollectionRepository(CollectionRepository $collectionRepository) |
|
| 43 | - { |
|
| 41 | + public function injectCollectionRepository(CollectionRepository $collectionRepository) { |
|
| 44 | 42 | $this->collectionRepository = $collectionRepository; |
| 45 | 43 | } |
| 46 | 44 | |
@@ -52,8 +50,7 @@ discard block |
||
| 52 | 50 | /** |
| 53 | 51 | * @param MetadataRepository $metadataRepository |
| 54 | 52 | */ |
| 55 | - public function injectMetadataRepository(MetadataRepository $metadataRepository) |
|
| 56 | - { |
|
| 53 | + public function injectMetadataRepository(MetadataRepository $metadataRepository) { |
|
| 57 | 54 | $this->metadataRepository = $metadataRepository; |
| 58 | 55 | } |
| 59 | 56 | |
@@ -65,16 +62,14 @@ discard block |
||
| 65 | 62 | /** |
| 66 | 63 | * @param StructureRepository $structureRepository |
| 67 | 64 | */ |
| 68 | - public function injectStructureRepository(StructureRepository $structureRepository) |
|
| 69 | - { |
|
| 65 | + public function injectStructureRepository(StructureRepository $structureRepository) { |
|
| 70 | 66 | $this->structureRepository = $structureRepository; |
| 71 | 67 | } |
| 72 | 68 | |
| 73 | 69 | /** |
| 74 | 70 | * @return string|void |
| 75 | 71 | */ |
| 76 | - public function mainAction() |
|
| 77 | - { |
|
| 72 | + public function mainAction() { |
|
| 78 | 73 | $this->cObj = $this->configurationManager->getContentObject(); |
| 79 | 74 | |
| 80 | 75 | // Load current document. |
@@ -130,8 +125,7 @@ discard block |
||
| 130 | 125 | * |
| 131 | 126 | * @return string The metadata array ready for output |
| 132 | 127 | */ |
| 133 | - protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) |
|
| 134 | - { |
|
| 128 | + protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) { |
|
| 135 | 129 | if ($useOriginalIiifManifestMetadata) { |
| 136 | 130 | $iiifData = []; |
| 137 | 131 | foreach ($metadataArray as $metadata) { |
@@ -250,8 +244,7 @@ discard block |
||
| 250 | 244 | } |
| 251 | 245 | |
| 252 | 246 | if (is_array($metadataArray[$i][$metadataName])) { |
| 253 | - $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value) |
|
| 254 | - { |
|
| 247 | + $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value) { |
|
| 255 | 248 | return !empty($value); |
| 256 | 249 | })); |
| 257 | 250 | } |
@@ -273,8 +266,7 @@ discard block |
||
| 273 | 266 | * |
| 274 | 267 | * @return array metadata |
| 275 | 268 | */ |
| 276 | - private function getMetadata() |
|
| 277 | - { |
|
| 269 | + private function getMetadata() { |
|
| 278 | 270 | $metadata = []; |
| 279 | 271 | if ($this->settings['rootline'] < 2) { |
| 280 | 272 | // Get current structure's @ID. |
@@ -312,8 +304,7 @@ discard block |
||
| 312 | 304 | * |
| 313 | 305 | * @return array metadata |
| 314 | 306 | */ |
| 315 | - private function getMetadataForIds($id, $metadata) |
|
| 316 | - { |
|
| 307 | + private function getMetadataForIds($id, $metadata) { |
|
| 317 | 308 | $useOriginalIiifManifestMetadata = $this->settings['originalIiifMetadata'] == 1 && $this->document->getDoc() instanceof IiifManifest; |
| 318 | 309 | foreach ($id as $sid) { |
| 319 | 310 | if ($useOriginalIiifManifestMetadata) { |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | * @subpackage dlf |
| 30 | 30 | * @access public |
| 31 | 31 | */ |
| 32 | -class ListViewController extends AbstractController |
|
| 33 | -{ |
|
| 32 | +class ListViewController extends AbstractController { |
|
| 34 | 33 | /** |
| 35 | 34 | * @var CollectionRepository |
| 36 | 35 | */ |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | /** |
| 40 | 39 | * @param CollectionRepository $collectionRepository |
| 41 | 40 | */ |
| 42 | - public function injectCollectionRepository(CollectionRepository $collectionRepository) |
|
| 43 | - { |
|
| 41 | + public function injectCollectionRepository(CollectionRepository $collectionRepository) { |
|
| 44 | 42 | $this->collectionRepository = $collectionRepository; |
| 45 | 43 | } |
| 46 | 44 | |
@@ -52,8 +50,7 @@ discard block |
||
| 52 | 50 | /** |
| 53 | 51 | * @param MetadataRepository $metadataRepository |
| 54 | 52 | */ |
| 55 | - public function injectMetadataRepository(MetadataRepository $metadataRepository) |
|
| 56 | - { |
|
| 53 | + public function injectMetadataRepository(MetadataRepository $metadataRepository) { |
|
| 57 | 54 | $this->metadataRepository = $metadataRepository; |
| 58 | 55 | } |
| 59 | 56 | |
@@ -68,8 +65,7 @@ discard block |
||
| 68 | 65 | * |
| 69 | 66 | * @return void |
| 70 | 67 | */ |
| 71 | - public function mainAction() |
|
| 72 | - { |
|
| 68 | + public function mainAction() { |
|
| 73 | 69 | $this->searchParams = $this->getParametersSafely('searchParameter'); |
| 74 | 70 | |
| 75 | 71 | $collection = null; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $this->searchParams = $this->getParametersSafely('searchParameter'); |
| 74 | 74 | |
| 75 | - $collection = null; |
|
| 75 | + $collection = NULL; |
|
| 76 | 76 | if ($this->searchParams['collection'] && MathUtility::canBeInterpretedAsInteger($this->searchParams['collection'])) { |
| 77 | 77 | $collection = $this->collectionRepository->findByUid($this->searchParams['collection']); |
| 78 | 78 | } |
@@ -83,15 +83,15 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | // get all sortable metadata records |
| 86 | - $sortableMetadata = $this->metadataRepository->findByIsSortable(true); |
|
| 86 | + $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE); |
|
| 87 | 87 | |
| 88 | 88 | // get all metadata records to be shown in results |
| 89 | - $listedMetadata = $this->metadataRepository->findByIsListed(true); |
|
| 89 | + $listedMetadata = $this->metadataRepository->findByIsListed(TRUE); |
|
| 90 | 90 | |
| 91 | 91 | $solrResults = []; |
| 92 | 92 | $numResults = 0; |
| 93 | 93 | if (is_array($this->searchParams) && !empty($this->searchParams)) { |
| 94 | - $solrResults = $this->documentRepository->findSolrByCollection($collection ? : null, $this->settings, $this->searchParams, $listedMetadata); |
|
| 94 | + $solrResults = $this->documentRepository->findSolrByCollection($collection ? : NULL, $this->settings, $this->searchParams, $listedMetadata); |
|
| 95 | 95 | $numResults = $solrResults->getNumFound(); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -22,15 +22,13 @@ discard block |
||
| 22 | 22 | * @subpackage dlf |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class PageGridController extends AbstractController |
|
| 26 | -{ |
|
| 25 | +class PageGridController extends AbstractController { |
|
| 27 | 26 | /** |
| 28 | 27 | * The main method of the plugin |
| 29 | 28 | * |
| 30 | 29 | * @return void |
| 31 | 30 | */ |
| 32 | - public function mainAction() |
|
| 33 | - { |
|
| 31 | + public function mainAction() { |
|
| 34 | 32 | $this->loadDocument($this->requestData); |
| 35 | 33 | if ( |
| 36 | 34 | $this->document === null |
@@ -65,8 +63,7 @@ discard block |
||
| 65 | 63 | * |
| 66 | 64 | * @return array The rendered entry ready for fluid |
| 67 | 65 | */ |
| 68 | - protected function getEntry($number, $fileGrpThumbs) |
|
| 69 | - { |
|
| 66 | + protected function getEntry($number, $fileGrpThumbs) { |
|
| 70 | 67 | // Set pagination. |
| 71 | 68 | $entry['pagination'] = htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$number]]['orderlabel']); |
| 72 | 69 | $entry['page'] = $number; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | $this->loadDocument($this->requestData); |
| 35 | 35 | if ( |
| 36 | - $this->document === null |
|
| 36 | + $this->document === NULL |
|
| 37 | 37 | || $this->document->getDoc()->numPages < 1 |
| 38 | 38 | || empty($this->extConf['fileGrpThumbs']) |
| 39 | 39 | ) { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $image['mimetypeLabel'] = $mimetypeLabel; |
| 254 | 254 | break; |
| 255 | 255 | } else { |
| 256 | - $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"'); |
|
| 256 | + $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"'); |
|
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | return $image; |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | empty($page1Link) |
| 345 | 345 | && empty($page2Link) |
| 346 | 346 | ) { |
| 347 | - $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"'); |
|
| 347 | + $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"'); |
|
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | if (!empty($page1Link)) { |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | if (!empty($workLink)) { |
| 384 | 384 | $workLink = $workLink; |
| 385 | 385 | } else { |
| 386 | - $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"'); |
|
| 386 | + $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"'); |
|
| 387 | 387 | } |
| 388 | 388 | return $workLink; |
| 389 | 389 | } |
@@ -23,15 +23,13 @@ discard block |
||
| 23 | 23 | * @subpackage dlf |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class ToolboxController extends AbstractController |
|
| 27 | -{ |
|
| 26 | +class ToolboxController extends AbstractController { |
|
| 28 | 27 | /** |
| 29 | 28 | * The main method of the plugin |
| 30 | 29 | * |
| 31 | 30 | * @return void |
| 32 | 31 | */ |
| 33 | - public function mainAction() |
|
| 34 | - { |
|
| 32 | + public function mainAction() { |
|
| 35 | 33 | // Load current document. |
| 36 | 34 | $this->loadDocument($this->requestData); |
| 37 | 35 | |
@@ -52,8 +50,7 @@ discard block |
||
| 52 | 50 | * |
| 53 | 51 | * @return void |
| 54 | 52 | */ |
| 55 | - public function annotationtool() |
|
| 56 | - { |
|
| 53 | + public function annotationtool() { |
|
| 57 | 54 | if ( |
| 58 | 55 | $this->document === null |
| 59 | 56 | || $this->document->getDoc()->numPages < 1 |
@@ -94,8 +91,7 @@ discard block |
||
| 94 | 91 | * |
| 95 | 92 | * @return void |
| 96 | 93 | */ |
| 97 | - public function fulltextdownloadtool() |
|
| 98 | - { |
|
| 94 | + public function fulltextdownloadtool() { |
|
| 99 | 95 | if ( |
| 100 | 96 | $this->document === null |
| 101 | 97 | || $this->document->getDoc()->numPages < 1 |
@@ -140,8 +136,7 @@ discard block |
||
| 140 | 136 | * |
| 141 | 137 | * @return void |
| 142 | 138 | */ |
| 143 | - public function fulltexttool() |
|
| 144 | - { |
|
| 139 | + public function fulltexttool() { |
|
| 145 | 140 | if ( |
| 146 | 141 | $this->document === null |
| 147 | 142 | || $this->document->getDoc()->numPages < 1 |
@@ -186,8 +181,7 @@ discard block |
||
| 186 | 181 | * |
| 187 | 182 | * @return void |
| 188 | 183 | */ |
| 189 | - public function imagedownloadtool() |
|
| 190 | - { |
|
| 184 | + public function imagedownloadtool() { |
|
| 191 | 185 | if ( |
| 192 | 186 | $this->document === null |
| 193 | 187 | || $this->document->getDoc()->numPages < 1 |
@@ -230,8 +224,7 @@ discard block |
||
| 230 | 224 | * |
| 231 | 225 | * @return array Array of image links and image format information |
| 232 | 226 | */ |
| 233 | - protected function getImage($page) |
|
| 234 | - { |
|
| 227 | + protected function getImage($page) { |
|
| 235 | 228 | $image = []; |
| 236 | 229 | // Get @USE value of METS fileGrp. |
| 237 | 230 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->settings['fileGrpsImageDownload']); |
@@ -264,8 +257,7 @@ discard block |
||
| 264 | 257 | * |
| 265 | 258 | * @return void |
| 266 | 259 | */ |
| 267 | - public function imagemanipulationtool() |
|
| 268 | - { |
|
| 260 | + public function imagemanipulationtool() { |
|
| 269 | 261 | // Set parent element for initialization. |
| 270 | 262 | $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool'; |
| 271 | 263 | |
@@ -278,8 +270,7 @@ discard block |
||
| 278 | 270 | * |
| 279 | 271 | * @return void |
| 280 | 272 | */ |
| 281 | - public function pdfdownloadtool() |
|
| 282 | - { |
|
| 273 | + public function pdfdownloadtool() { |
|
| 283 | 274 | if ( |
| 284 | 275 | $this->document === null |
| 285 | 276 | || $this->document->getDoc() === null |
@@ -318,8 +309,7 @@ discard block |
||
| 318 | 309 | * |
| 319 | 310 | * @return array Link to downloadable page |
| 320 | 311 | */ |
| 321 | - protected function getPageLink() |
|
| 322 | - { |
|
| 312 | + protected function getPageLink() { |
|
| 323 | 313 | $page1Link = ''; |
| 324 | 314 | $page2Link = ''; |
| 325 | 315 | $pageLinkArray = []; |
@@ -363,8 +353,7 @@ discard block |
||
| 363 | 353 | * |
| 364 | 354 | * @return string Link to downloadable work |
| 365 | 355 | */ |
| 366 | - protected function getWorkLink() |
|
| 367 | - { |
|
| 356 | + protected function getWorkLink() { |
|
| 368 | 357 | $workLink = ''; |
| 369 | 358 | $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']); |
| 370 | 359 | // Get work link. |
@@ -393,8 +382,7 @@ discard block |
||
| 393 | 382 | * |
| 394 | 383 | * @return void |
| 395 | 384 | */ |
| 396 | - public function searchindocumenttool() |
|
| 397 | - { |
|
| 385 | + public function searchindocumenttool() { |
|
| 398 | 386 | if ( |
| 399 | 387 | $this->document === null |
| 400 | 388 | || $this->document->getDoc()->numPages < 1 |
@@ -457,8 +445,7 @@ discard block |
||
| 457 | 445 | * |
| 458 | 446 | * @return string with current document id |
| 459 | 447 | */ |
| 460 | - protected function getCurrentDocumentId() |
|
| 461 | - { |
|
| 448 | + protected function getCurrentDocumentId() { |
|
| 462 | 449 | $id = $this->document->getUid(); |
| 463 | 450 | |
| 464 | 451 | if ($id !== null && $id > 0) { |
@@ -493,8 +480,7 @@ discard block |
||
| 493 | 480 | * |
| 494 | 481 | * @return string with encrypted core name |
| 495 | 482 | */ |
| 496 | - protected function getEncryptedCoreName() |
|
| 497 | - { |
|
| 483 | + protected function getEncryptedCoreName() { |
|
| 498 | 484 | // Get core name. |
| 499 | 485 | $name = Helper::getIndexNameFromUid($this->settings['solrcore'], 'tx_dlf_solrcores'); |
| 500 | 486 | // Encrypt core name. |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | foreach ($tools as $tool) { |
| 44 | 44 | $tool = trim(str_replace('tx_dlf_', '', $tool)); |
| 45 | 45 | $this->$tool(); |
| 46 | - $this->view->assign($tool, true); |
|
| 46 | + $this->view->assign($tool, TRUE); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function annotationtool() |
| 56 | 56 | { |
| 57 | 57 | if ( |
| 58 | - $this->document === null |
|
| 58 | + $this->document === NULL |
|
| 59 | 59 | || $this->document->getDoc()->numPages < 1 |
| 60 | 60 | ) { |
| 61 | 61 | // Quit without doing anything if required variables are not set. |
@@ -80,12 +80,12 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $annotationContainers = $this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$this->requestData['page']]]['annotationContainers']; |
| 82 | 82 | if ( |
| 83 | - $annotationContainers != null |
|
| 83 | + $annotationContainers != NULL |
|
| 84 | 84 | && sizeof($annotationContainers) > 0 |
| 85 | 85 | ) { |
| 86 | - $this->view->assign('annotationTool', true); |
|
| 86 | + $this->view->assign('annotationTool', TRUE); |
|
| 87 | 87 | } else { |
| 88 | - $this->view->assign('annotationTool', false); |
|
| 88 | + $this->view->assign('annotationTool', FALSE); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | public function fulltextdownloadtool() |
| 98 | 98 | { |
| 99 | 99 | if ( |
| 100 | - $this->document === null |
|
| 100 | + $this->document === NULL |
|
| 101 | 101 | || $this->document->getDoc()->numPages < 1 |
| 102 | 102 | || empty($this->extConf['fileGrpFulltext']) |
| 103 | 103 | ) { |
@@ -129,9 +129,9 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | if (!empty($fullTextFile)) { |
| 132 | - $this->view->assign('fulltextDownload', true); |
|
| 132 | + $this->view->assign('fulltextDownload', TRUE); |
|
| 133 | 133 | } else { |
| 134 | - $this->view->assign('fulltextDownload', false); |
|
| 134 | + $this->view->assign('fulltextDownload', FALSE); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | public function fulltexttool() |
| 144 | 144 | { |
| 145 | 145 | if ( |
| 146 | - $this->document === null |
|
| 146 | + $this->document === NULL |
|
| 147 | 147 | || $this->document->getDoc()->numPages < 1 |
| 148 | 148 | || empty($this->extConf['fileGrpFulltext']) |
| 149 | 149 | ) { |
@@ -174,10 +174,10 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | if (!empty($fullTextFile)) { |
| 177 | - $this->view->assign('fulltext', true); |
|
| 177 | + $this->view->assign('fulltext', TRUE); |
|
| 178 | 178 | $this->view->assign('activateFullTextInitially', MathUtility::forceIntegerInRange($this->settings['activateFullTextInitially'], 0, 1, 0)); |
| 179 | 179 | } else { |
| 180 | - $this->view->assign('fulltext', false); |
|
| 180 | + $this->view->assign('fulltext', FALSE); |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | public function imagedownloadtool() |
| 190 | 190 | { |
| 191 | 191 | if ( |
| 192 | - $this->document === null |
|
| 192 | + $this->document === NULL |
|
| 193 | 193 | || $this->document->getDoc()->numPages < 1 |
| 194 | 194 | || empty($this->settings['fileGrpsImageDownload']) |
| 195 | 195 | ) { |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | // Set parent element for initialization. |
| 270 | 270 | $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool'; |
| 271 | 271 | |
| 272 | - $this->view->assign('imageManipulation', true); |
|
| 272 | + $this->view->assign('imageManipulation', TRUE); |
|
| 273 | 273 | $this->view->assign('parentContainer', $parentContainer); |
| 274 | 274 | } |
| 275 | 275 | |
@@ -281,8 +281,8 @@ discard block |
||
| 281 | 281 | public function pdfdownloadtool() |
| 282 | 282 | { |
| 283 | 283 | if ( |
| 284 | - $this->document === null |
|
| 285 | - || $this->document->getDoc() === null |
|
| 284 | + $this->document === NULL |
|
| 285 | + || $this->document->getDoc() === NULL |
|
| 286 | 286 | || $this->document->getDoc()->numPages < 1 |
| 287 | 287 | || empty($this->extConf['fileGrpDownload']) |
| 288 | 288 | ) { |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | public function searchindocumenttool() |
| 397 | 397 | { |
| 398 | 398 | if ( |
| 399 | - $this->document === null |
|
| 399 | + $this->document === NULL |
|
| 400 | 400 | || $this->document->getDoc()->numPages < 1 |
| 401 | 401 | || empty($this->extConf['fileGrpFulltext']) |
| 402 | 402 | || empty($this->settings['solrcore']) |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | { |
| 462 | 462 | $id = $this->document->getUid(); |
| 463 | 463 | |
| 464 | - if ($id !== null && $id > 0) { |
|
| 464 | + if ($id !== NULL && $id > 0) { |
|
| 465 | 465 | // we found the document uid |
| 466 | 466 | return (string) $id; |
| 467 | 467 | } else { |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | $pageOptions = []; |
| 76 | 76 | for ($i = 1; $i <= $this->document->getDoc()->numPages; $i++) { |
| 77 | - $pageOptions[$i] = '[' . $i . ']' . ($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : ''); |
|
| 77 | + $pageOptions[$i] = '['.$i.']'.($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : ''); |
|
| 78 | 78 | } |
| 79 | 79 | $this->view->assign('pageOptions', $pageOptions); |
| 80 | 80 | |
@@ -23,15 +23,13 @@ |
||
| 23 | 23 | * @subpackage dlf |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class NavigationController extends AbstractController |
|
| 27 | -{ |
|
| 26 | +class NavigationController extends AbstractController { |
|
| 28 | 27 | /** |
| 29 | 28 | * The main method of the plugin |
| 30 | 29 | * |
| 31 | 30 | * @return void |
| 32 | 31 | */ |
| 33 | - public function mainAction() |
|
| 34 | - { |
|
| 32 | + public function mainAction() { |
|
| 35 | 33 | // Load current document. |
| 36 | 34 | $this->loadDocument($this->requestData); |
| 37 | 35 | if ( |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | // Load current document. |
| 36 | 36 | $this->loadDocument($this->requestData); |
| 37 | 37 | if ( |
| 38 | - $this->document === null |
|
| 39 | - || $this->document->getDoc() === null |
|
| 38 | + $this->document === NULL |
|
| 39 | + || $this->document->getDoc() === NULL |
|
| 40 | 40 | ) { |
| 41 | 41 | // Quit without doing anything if required variables are not set. |
| 42 | 42 | return ''; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | // prepare feature array for fluid |
| 82 | 82 | $features = []; |
| 83 | 83 | foreach (explode(',', $this->settings['features']) as $feature) { |
| 84 | - $features[$feature] = true; |
|
| 84 | + $features[$feature] = TRUE; |
|
| 85 | 85 | } |
| 86 | 86 | $this->view->assign('features', $features); |
| 87 | 87 | } |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
| 143 | - $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB'); |
|
| 143 | + $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB'); |
|
| 144 | 144 | } |
| 145 | 145 | return $entryArray; |
| 146 | 146 | } |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | * @subpackage dlf |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class TableOfContentsController extends AbstractController |
|
| 28 | -{ |
|
| 27 | +class TableOfContentsController extends AbstractController { |
|
| 29 | 28 | /** |
| 30 | 29 | * This holds the active entries according to the currently selected page |
| 31 | 30 | * |
@@ -44,8 +43,7 @@ discard block |
||
| 44 | 43 | * |
| 45 | 44 | * @return array HMENU array for menu entry |
| 46 | 45 | */ |
| 47 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
| 48 | - { |
|
| 46 | + protected function getMenuEntry(array $entry, $recursive = false) { |
|
| 49 | 47 | $entry = $this->resolveMenuEntry($entry); |
| 50 | 48 | |
| 51 | 49 | $entryArray = []; |
@@ -139,8 +137,7 @@ discard block |
||
| 139 | 137 | * @param array $entry |
| 140 | 138 | * @return array |
| 141 | 139 | */ |
| 142 | - protected function resolveMenuEntry($entry) |
|
| 143 | - { |
|
| 140 | + protected function resolveMenuEntry($entry) { |
|
| 144 | 141 | // If the menu entry points to the parent document, |
| 145 | 142 | // resolve to the parent UID set on indexation. |
| 146 | 143 | $doc = $this->document->getDoc(); |
@@ -161,8 +158,7 @@ discard block |
||
| 161 | 158 | * |
| 162 | 159 | * @return void |
| 163 | 160 | */ |
| 164 | - public function mainAction() |
|
| 165 | - { |
|
| 161 | + public function mainAction() { |
|
| 166 | 162 | $this->view->assign('toc', $this->makeMenuArray()); |
| 167 | 163 | } |
| 168 | 164 | |
@@ -172,8 +168,7 @@ discard block |
||
| 172 | 168 | * @access public |
| 173 | 169 | * @return array HMENU array |
| 174 | 170 | */ |
| 175 | - public function makeMenuArray() |
|
| 176 | - { |
|
| 171 | + public function makeMenuArray() { |
|
| 177 | 172 | // Load current document. |
| 178 | 173 | $this->loadDocument($this->requestData); |
| 179 | 174 | if ( |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return array HMENU array for menu entry |
| 46 | 46 | */ |
| 47 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
| 47 | + protected function getMenuEntry(array $entry, $recursive = FALSE) |
|
| 48 | 48 | { |
| 49 | 49 | $entry = $this->resolveMenuEntry($entry); |
| 50 | 50 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | // Build sub-menu if available and called recursively. |
| 104 | 104 | if ( |
| 105 | - $recursive === true |
|
| 105 | + $recursive === TRUE |
|
| 106 | 106 | && !empty($entry['children']) |
| 107 | 107 | ) { |
| 108 | 108 | // Build sub-menu only if one of the following conditions apply: |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | if (in_array($child['id'], $this->activeEntries)) { |
| 121 | 121 | $entryArray['ITEM_STATE'] = 'ACT'; |
| 122 | 122 | } |
| 123 | - $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true); |
|
| 123 | + $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
@@ -177,8 +177,8 @@ discard block |
||
| 177 | 177 | // Load current document. |
| 178 | 178 | $this->loadDocument($this->requestData); |
| 179 | 179 | if ( |
| 180 | - $this->document === null |
|
| 181 | - || $this->document->getDoc() === null |
|
| 180 | + $this->document === NULL |
|
| 181 | + || $this->document->getDoc() === NULL |
|
| 182 | 182 | ) { |
| 183 | 183 | // Quit without doing anything if required variables are not set. |
| 184 | 184 | return []; |
@@ -225,12 +225,12 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | // Go through table of contents and create all menu entries. |
| 227 | 227 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
| 228 | - $menuArray[] = $this->getMenuEntry($entry, true); |
|
| 228 | + $menuArray[] = $this->getMenuEntry($entry, TRUE); |
|
| 229 | 229 | } |
| 230 | 230 | } else { |
| 231 | 231 | // Go through table of contents and create top-level menu entries. |
| 232 | 232 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
| 233 | - $menuArray[] = $this->getMenuEntry($entry, false); |
|
| 233 | + $menuArray[] = $this->getMenuEntry($entry, FALSE); |
|
| 234 | 234 | } |
| 235 | 235 | // Build table of contents from database. |
| 236 | 236 | $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | 'pagination' => '', |
| 250 | 250 | 'targetUid' => $resArray['uid'] |
| 251 | 251 | ]; |
| 252 | - $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false); |
|
| 252 | + $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE); |
|
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | ) { |
| 140 | 140 | // Get current configuration. |
| 141 | 141 | $result = $queryBuilder |
| 142 | - ->select($table . '.is_listed AS is_listed') |
|
| 142 | + ->select($table.'.is_listed AS is_listed') |
|
| 143 | 143 | ->from($table) |
| 144 | 144 | ->where( |
| 145 | - $queryBuilder->expr()->eq($table . '.uid', intval($id)), |
|
| 145 | + $queryBuilder->expr()->eq($table.'.uid', intval($id)), |
|
| 146 | 146 | Helper::whereExpression($table) |
| 147 | 147 | ) |
| 148 | 148 | ->setMaxResults(1) |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | ) { |
| 165 | 165 | // Get current configuration. |
| 166 | 166 | $result = $queryBuilder |
| 167 | - ->select($table . '.index_autocomplete AS index_autocomplete') |
|
| 167 | + ->select($table.'.index_autocomplete AS index_autocomplete') |
|
| 168 | 168 | ->from($table) |
| 169 | 169 | ->where( |
| 170 | - $queryBuilder->expr()->eq($table . '.uid', intval($id)), |
|
| 170 | + $queryBuilder->expr()->eq($table.'.uid', intval($id)), |
|
| 171 | 171 | Helper::whereExpression($table) |
| 172 | 172 | ) |
| 173 | 173 | ->setMaxResults(1) |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if ($solr->ready) { |
| 243 | 243 | // Delete Solr document. |
| 244 | 244 | $updateQuery = $solr->service->createUpdate(); |
| 245 | - $updateQuery->addDeleteQuery('uid:' . $id); |
|
| 245 | + $updateQuery->addDeleteQuery('uid:'.$id); |
|
| 246 | 246 | $updateQuery->addCommit(); |
| 247 | 247 | $solr->service->update($updateQuery); |
| 248 | 248 | } |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $document->setDoc($doc); |
| 255 | 255 | Indexer::add($document); |
| 256 | 256 | } else { |
| 257 | - $this->logger->error('Failed to re-index document with UID ' . $id); |
|
| 257 | + $this->logger->error('Failed to re-index document with UID '.$id); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | } |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | if ($solr->ready) { |
| 322 | 322 | // Delete Solr document. |
| 323 | 323 | $updateQuery = $solr->service->createUpdate(); |
| 324 | - $updateQuery->addDeleteQuery('uid:' . $id); |
|
| 324 | + $updateQuery->addDeleteQuery('uid:'.$id); |
|
| 325 | 325 | $updateQuery->addCommit(); |
| 326 | 326 | $solr->service->update($updateQuery); |
| 327 | 327 | if ($command == 'delete') { |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $document->setDoc($doc); |
| 337 | 337 | Indexer::add($document); |
| 338 | 338 | } else { |
| 339 | - $this->logger->error('Failed to re-index document with UID ' . $id); |
|
| 339 | + $this->logger->error('Failed to re-index document with UID '.$id); |
|
| 340 | 340 | } |
| 341 | 341 | break; |
| 342 | 342 | } |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | // Nothing to do here. |
| 388 | 388 | } |
| 389 | 389 | } |
| 390 | - $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); |
|
| 390 | + $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr'); |
|
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | } |
@@ -34,8 +34,7 @@ discard block |
||
| 34 | 34 | * @subpackage dlf |
| 35 | 35 | * @access public |
| 36 | 36 | */ |
| 37 | -class DataHandler implements LoggerAwareInterface |
|
| 38 | -{ |
|
| 37 | +class DataHandler implements LoggerAwareInterface { |
|
| 39 | 38 | use LoggerAwareTrait; |
| 40 | 39 | |
| 41 | 40 | /** |
@@ -43,8 +42,7 @@ discard block |
||
| 43 | 42 | */ |
| 44 | 43 | protected $documentRepository; |
| 45 | 44 | |
| 46 | - protected function getDocumentRepository() |
|
| 47 | - { |
|
| 45 | + protected function getDocumentRepository() { |
|
| 48 | 46 | if ($this->documentRepository === null) { |
| 49 | 47 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 50 | 48 | $this->documentRepository = $objectManager->get(DocumentRepository::class); |
@@ -65,8 +63,7 @@ discard block |
||
| 65 | 63 | * |
| 66 | 64 | * @return void |
| 67 | 65 | */ |
| 68 | - public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray) |
|
| 69 | - { |
|
| 66 | + public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray) { |
|
| 70 | 67 | if ($status == 'new') { |
| 71 | 68 | switch ($table) { |
| 72 | 69 | // Field post-processing for table "tx_dlf_documents". |
@@ -195,8 +192,7 @@ discard block |
||
| 195 | 192 | * |
| 196 | 193 | * @return void |
| 197 | 194 | */ |
| 198 | - public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray) |
|
| 199 | - { |
|
| 195 | + public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray) { |
|
| 200 | 196 | if ($status == 'update') { |
| 201 | 197 | switch ($table) { |
| 202 | 198 | // After database operations for table "tx_dlf_documents". |
@@ -275,8 +271,7 @@ discard block |
||
| 275 | 271 | * |
| 276 | 272 | * @return void |
| 277 | 273 | */ |
| 278 | - public function processCmdmap_postProcess($command, $table, $id) |
|
| 279 | - { |
|
| 274 | + public function processCmdmap_postProcess($command, $table, $id) { |
|
| 280 | 275 | if ( |
| 281 | 276 | in_array($command, ['move', 'delete', 'undelete']) |
| 282 | 277 | && $table == 'tx_dlf_documents' |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | protected function getDocumentRepository() |
| 47 | 47 | { |
| 48 | - if ($this->documentRepository === null) { |
|
| 48 | + if ($this->documentRepository === NULL) { |
|
| 49 | 49 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 50 | 50 | $this->documentRepository = $objectManager->get(DocumentRepository::class); |
| 51 | 51 | } |
@@ -249,8 +249,8 @@ discard block |
||
| 249 | 249 | } else { |
| 250 | 250 | // Reindex document. |
| 251 | 251 | $document = $this->getDocumentRepository()->findByUid($id); |
| 252 | - $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true); |
|
| 253 | - if ($document !== null && $doc !== null) { |
|
| 252 | + $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE); |
|
| 253 | + if ($document !== NULL && $doc !== NULL) { |
|
| 254 | 254 | $document->setDoc($doc); |
| 255 | 255 | Indexer::add($document); |
| 256 | 256 | } else { |
@@ -331,8 +331,8 @@ discard block |
||
| 331 | 331 | case 'undelete': |
| 332 | 332 | // Reindex document. |
| 333 | 333 | $document = $this->getDocumentRepository()->findByUid($id); |
| 334 | - $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true); |
|
| 335 | - if ($document !== null && $doc !== null) { |
|
| 334 | + $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE); |
|
| 335 | + if ($document !== NULL && $doc !== NULL) { |
|
| 336 | 336 | $document->setDoc($doc); |
| 337 | 337 | Indexer::add($document); |
| 338 | 338 | } else { |
@@ -374,9 +374,9 @@ discard block |
||
| 374 | 374 | $query = $solr->service->createCoreAdmin(); |
| 375 | 375 | $action = $query->createUnload(); |
| 376 | 376 | $action->setCore($resArray['core']); |
| 377 | - $action->setDeleteDataDir(true); |
|
| 378 | - $action->setDeleteIndex(true); |
|
| 379 | - $action->setDeleteInstanceDir(true); |
|
| 377 | + $action->setDeleteDataDir(TRUE); |
|
| 378 | + $action->setDeleteIndex(TRUE); |
|
| 379 | + $action->setDeleteInstanceDir(TRUE); |
|
| 380 | 380 | $query->setAction($action); |
| 381 | 381 | try { |
| 382 | 382 | $response = $solr->service->coreAdmin($query); |
@@ -126,8 +126,8 @@ |
||
| 126 | 126 | ->select(...explode(',', $fields)) |
| 127 | 127 | ->from($table) |
| 128 | 128 | ->where( |
| 129 | - $queryBuilder->expr()->eq($table . '.pid', intval($this->storagePid)), |
|
| 130 | - $queryBuilder->expr()->in($table . '.sys_language_uid', [-1, 0]), |
|
| 129 | + $queryBuilder->expr()->eq($table.'.pid', intval($this->storagePid)), |
|
| 130 | + $queryBuilder->expr()->in($table.'.sys_language_uid', [-1, 0]), |
|
| 131 | 131 | $andWhere |
| 132 | 132 | ) |
| 133 | 133 | ->orderBy($sorting) |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class ItemsProcFunc |
|
| 30 | -{ |
|
| 29 | +class ItemsProcFunc { |
|
| 31 | 30 | /** |
| 32 | 31 | * @var int |
| 33 | 32 | */ |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | * |
| 43 | 42 | * @return void |
| 44 | 43 | */ |
| 45 | - public function toolList(&$params) |
|
| 46 | - { |
|
| 44 | + public function toolList(&$params) { |
|
| 47 | 45 | foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] as $class => $label) { |
| 48 | 46 | $params['items'][] = [Helper::getLanguageService()->sL($label), $class]; |
| 49 | 47 | } |
@@ -56,8 +54,7 @@ discard block |
||
| 56 | 54 | * |
| 57 | 55 | * @return void |
| 58 | 56 | */ |
| 59 | - public function __construct() |
|
| 60 | - { |
|
| 57 | + public function __construct() { |
|
| 61 | 58 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 62 | 59 | $configurationManager = $objectManager->get(ConfigurationManager::class); |
| 63 | 60 | // we must get the storagePid from full TypoScript setup at this point. |
@@ -74,8 +71,7 @@ discard block |
||
| 74 | 71 | * |
| 75 | 72 | * @return void |
| 76 | 73 | */ |
| 77 | - public function extendedSearchList(&$params) |
|
| 78 | - { |
|
| 74 | + public function extendedSearchList(&$params) { |
|
| 79 | 75 | $this->generateList( |
| 80 | 76 | $params, |
| 81 | 77 | 'label,index_name', |
@@ -116,8 +112,7 @@ discard block |
||
| 116 | 112 | * |
| 117 | 113 | * @return void |
| 118 | 114 | */ |
| 119 | - protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') |
|
| 120 | - { |
|
| 115 | + protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') { |
|
| 121 | 116 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 122 | 117 | ->getQueryBuilderForTable($table); |
| 123 | 118 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters'] |
| 23 | 23 | $result = $this->initializeResultArray(); |
| 24 | 24 | if (!empty($this->data['databaseRow']['thumbnail'])) { |
| 25 | - $result['html'] = '<img alt="Thumbnail" title="" src="' . $this->data['databaseRow']['thumbnail'] . '" />'; |
|
| 25 | + $result['html'] = '<img alt="Thumbnail" title="" src="'.$this->data['databaseRow']['thumbnail'].'" />'; |
|
| 26 | 26 | } else { |
| 27 | 27 | $result['html'] = ''; |
| 28 | 28 | } |
@@ -14,10 +14,8 @@ |
||
| 14 | 14 | |
| 15 | 15 | use TYPO3\CMS\Backend\Form\Element\AbstractFormElement; |
| 16 | 16 | |
| 17 | -class ThumbnailCustomElement extends AbstractFormElement |
|
| 18 | -{ |
|
| 19 | - public function render() |
|
| 20 | - { |
|
| 17 | +class ThumbnailCustomElement extends AbstractFormElement { |
|
| 18 | + public function render() { |
|
| 21 | 19 | // Custom TCA properties and other data can be found in $this->data, for example the above |
| 22 | 20 | // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters'] |
| 23 | 21 | $result = $this->initializeResultArray(); |