@@ -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 | * |
@@ -45,8 +44,7 @@ discard block |
||
| 45 | 44 | * |
| 46 | 45 | * @return void |
| 47 | 46 | */ |
| 48 | - public function filterAction() |
|
| 49 | - { |
|
| 47 | + public function filterAction() { |
|
| 50 | 48 | // if filter was triggered, get filter parameters from POST variables |
| 51 | 49 | $this->filterParams = $this->getParametersSafely('filterParameter'); |
| 52 | 50 | |
@@ -59,8 +57,7 @@ discard block |
||
| 59 | 57 | * |
| 60 | 58 | * @return void |
| 61 | 59 | */ |
| 62 | - public function mainAction() |
|
| 63 | - { |
|
| 60 | + public function mainAction() { |
|
| 64 | 61 | // Load current document. |
| 65 | 62 | $this->loadDocument($this->requestData); |
| 66 | 63 | if ( |
@@ -91,8 +88,7 @@ discard block |
||
| 91 | 88 | * @access protected |
| 92 | 89 | * @return array HMENU array |
| 93 | 90 | */ |
| 94 | - protected function makeMenuArray() |
|
| 95 | - { |
|
| 91 | + protected function makeMenuArray() { |
|
| 96 | 92 | // Set default values for page if not set. |
| 97 | 93 | // $this->requestData['page'] may be integer or string (physical structure @ID) |
| 98 | 94 | if ( |
@@ -168,8 +164,7 @@ discard block |
||
| 168 | 164 | * |
| 169 | 165 | * @return array HMENU array |
| 170 | 166 | */ |
| 171 | - protected function makeMenuFor3DObjects() |
|
| 172 | - { |
|
| 167 | + protected function makeMenuFor3DObjects() { |
|
| 173 | 168 | $menuArray = []; |
| 174 | 169 | |
| 175 | 170 | // Go through table of contents and create all menu entries. |
@@ -192,8 +187,7 @@ discard block |
||
| 192 | 187 | * |
| 193 | 188 | * @return array HMENU array for menu entry |
| 194 | 189 | */ |
| 195 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
| 196 | - { |
|
| 190 | + protected function getMenuEntry(array $entry, $recursive = false) { |
|
| 197 | 191 | $entry = $this->resolveMenuEntry($entry); |
| 198 | 192 | |
| 199 | 193 | $entryArray = []; |
@@ -287,8 +281,7 @@ discard block |
||
| 287 | 281 | * @param array $entry |
| 288 | 282 | * @return array |
| 289 | 283 | */ |
| 290 | - protected function resolveMenuEntry($entry) |
|
| 291 | - { |
|
| 284 | + protected function resolveMenuEntry($entry) { |
|
| 292 | 285 | // If the menu entry points to the parent document, |
| 293 | 286 | // resolve to the parent UID set on indexation. |
| 294 | 287 | $doc = $this->document->getDoc(); |
@@ -304,8 +297,7 @@ discard block |
||
| 304 | 297 | return $entry; |
| 305 | 298 | } |
| 306 | 299 | |
| 307 | - protected function getMenuEntryWithImage(array $entry, $recursive = false) |
|
| 308 | - { |
|
| 300 | + protected function getMenuEntryWithImage(array $entry, $recursive = false) { |
|
| 309 | 301 | $entryArray = []; |
| 310 | 302 | |
| 311 | 303 | // don't filter if the entry type is collection or search params are empty |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->filterParams = $this->getParametersSafely('filterParameter'); |
| 52 | 52 | |
| 53 | 53 | // output is done by main action |
| 54 | - $this->forward('main', null, null, ['filterParameter' => $this->filterParams]); |
|
| 54 | + $this->forward('main', NULL, NULL, ['filterParameter' => $this->filterParams]); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | // Load current document. |
| 65 | 65 | $this->loadDocument($this->requestData); |
| 66 | 66 | if ( |
| 67 | - $this->document === null |
|
| 68 | - || $this->document->getDoc() === null |
|
| 67 | + $this->document === NULL |
|
| 68 | + || $this->document->getDoc() === NULL |
|
| 69 | 69 | ) { |
| 70 | 70 | // Quit without doing anything if required variables are not set. |
| 71 | 71 | return; |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | // Go through table of contents and create all menu entries. |
| 129 | 129 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
| 130 | - $menuArray[] = $this->getMenuEntry($entry, true); |
|
| 130 | + $menuArray[] = $this->getMenuEntry($entry, TRUE); |
|
| 131 | 131 | } |
| 132 | 132 | } else { |
| 133 | 133 | // Go through table of contents and create top-level menu entries. |
| 134 | 134 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
| 135 | - $menuArray[] = $this->getMenuEntry($entry, false); |
|
| 135 | + $menuArray[] = $this->getMenuEntry($entry, FALSE); |
|
| 136 | 136 | } |
| 137 | 137 | // Build table of contents from database. |
| 138 | 138 | $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | 'pagination' => '', |
| 152 | 152 | 'targetUid' => $resArray['uid'] |
| 153 | 153 | ]; |
| 154 | - $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false); |
|
| 154 | + $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE); |
|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | |
| 175 | 175 | // Go through table of contents and create all menu entries. |
| 176 | 176 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
| 177 | - $menuEntry = $this->getMenuEntryWithImage($entry, true); |
|
| 177 | + $menuEntry = $this->getMenuEntryWithImage($entry, TRUE); |
|
| 178 | 178 | if (!empty($menuEntry)) { |
| 179 | 179 | $menuArray[] = $menuEntry; |
| 180 | 180 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @return array HMENU array for menu entry |
| 194 | 194 | */ |
| 195 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
| 195 | + protected function getMenuEntry(array $entry, $recursive = FALSE) |
|
| 196 | 196 | { |
| 197 | 197 | $entry = $this->resolveMenuEntry($entry); |
| 198 | 198 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | } |
| 251 | 251 | // Build sub-menu if available and called recursively. |
| 252 | 252 | if ( |
| 253 | - $recursive === true |
|
| 253 | + $recursive === TRUE |
|
| 254 | 254 | && !empty($entry['children']) |
| 255 | 255 | ) { |
| 256 | 256 | // Build sub-menu only if one of the following conditions apply: |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | if (in_array($child['id'], $this->activeEntries)) { |
| 269 | 269 | $entryArray['ITEM_STATE'] = 'ACT'; |
| 270 | 270 | } |
| 271 | - $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true); |
|
| 271 | + $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE); |
|
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | return $entry; |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | - protected function getMenuEntryWithImage(array $entry, $recursive = false) |
|
| 307 | + protected function getMenuEntryWithImage(array $entry, $recursive = FALSE) |
|
| 308 | 308 | { |
| 309 | 309 | $entryArray = []; |
| 310 | 310 | |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $entryArray['doNotLinkIt'] = 1; |
| 326 | 326 | $entryArray['ITEM_STATE'] = 'HEADER'; |
| 327 | 327 | |
| 328 | - if ($entry['children'] === null) { |
|
| 328 | + if ($entry['children'] === NULL) { |
|
| 329 | 329 | $entryArray['description'] = $entry['description']; |
| 330 | 330 | $id = $this->document->getDoc()->smLinks['l2p'][$entry['id']][0]; |
| 331 | 331 | $entryArray['image'] = $this->document->getDoc()->getFileLocation($this->document->getDoc()->physicalStructureInfo[$id]['files']['THUMBS']); |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | // Build sub-menu if available and called recursively. |
| 340 | 340 | if ( |
| 341 | - $recursive == true |
|
| 341 | + $recursive == TRUE |
|
| 342 | 342 | && !empty($entry['children']) |
| 343 | 343 | ) { |
| 344 | 344 | // Build sub-menu only if one of the following conditions apply: |
@@ -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) |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | * @subpackage dlf |
| 29 | 29 | * @access public |
| 30 | 30 | */ |
| 31 | -class ItemsProcFunc implements LoggerAwareInterface |
|
| 32 | -{ |
|
| 31 | +class ItemsProcFunc implements LoggerAwareInterface { |
|
| 33 | 32 | use LoggerAwareTrait; |
| 34 | 33 | |
| 35 | 34 | /** |
@@ -46,8 +45,7 @@ discard block |
||
| 46 | 45 | * |
| 47 | 46 | * @return void |
| 48 | 47 | */ |
| 49 | - public function toolList(&$params) |
|
| 50 | - { |
|
| 48 | + public function toolList(&$params) { |
|
| 51 | 49 | foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] as $class => $label) { |
| 52 | 50 | $params['items'][] = [Helper::getLanguageService()->sL($label), $class]; |
| 53 | 51 | } |
@@ -97,8 +95,7 @@ discard block |
||
| 97 | 95 | * |
| 98 | 96 | * @return void |
| 99 | 97 | */ |
| 100 | - public function extendedSearchList(&$params) |
|
| 101 | - { |
|
| 98 | + public function extendedSearchList(&$params) { |
|
| 102 | 99 | $this->generateList( |
| 103 | 100 | $params, |
| 104 | 101 | 'label,index_name', |
@@ -139,8 +136,7 @@ discard block |
||
| 139 | 136 | * |
| 140 | 137 | * @return void |
| 141 | 138 | */ |
| 142 | - protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') |
|
| 143 | - { |
|
| 139 | + protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') { |
|
| 144 | 140 | $this->getTyposcriptConfigFromPluginSiteRoot($params); |
| 145 | 141 | |
| 146 | 142 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
@@ -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(); |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | * @subpackage dlf |
| 30 | 30 | * @access public |
| 31 | 31 | */ |
| 32 | -class ConfigurationForm |
|
| 33 | -{ |
|
| 32 | +class ConfigurationForm { |
|
| 34 | 33 | |
| 35 | 34 | /** |
| 36 | 35 | * Check if a connection to a Solr server could be established with the given credentials. |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * |
| 40 | 39 | * @return string Message informing the user of success or failure |
| 41 | 40 | */ |
| 42 | - public function checkSolrConnection() |
|
| 43 | - { |
|
| 41 | + public function checkSolrConnection() { |
|
| 44 | 42 | $solr = Solr::getInstance(); |
| 45 | 43 | if ($solr->ready) { |
| 46 | 44 | Helper::addMessage( |
@@ -65,8 +63,7 @@ discard block |
||
| 65 | 63 | * |
| 66 | 64 | * @return void |
| 67 | 65 | */ |
| 68 | - public function __construct() |
|
| 69 | - { |
|
| 66 | + public function __construct() { |
|
| 70 | 67 | // Load backend localization file. |
| 71 | 68 | Helper::getLanguageService()->includeLLFile('EXT:dlf/Resources/Private/Language/locallang_be.xlf'); |
| 72 | 69 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @var \Kitodo\Dlf\Common\Doc|null |
| 42 | 42 | */ |
| 43 | - protected $doc = null; |
|
| 43 | + protected $doc = NULL; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * @var string |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> |
| 157 | 157 | * @Extbase\ORM\Lazy |
| 158 | 158 | */ |
| 159 | - protected $collections = null; |
|
| 159 | + protected $collections = NULL; |
|
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | 162 | * @var string |
@@ -192,14 +192,12 @@ discard block |
||
| 192 | 192 | /** |
| 193 | 193 | * constructor |
| 194 | 194 | */ |
| 195 | - public function __construct() |
|
| 196 | - { |
|
| 195 | + public function __construct() { |
|
| 197 | 196 | // Do not remove the next line: It would break the functionality |
| 198 | 197 | $this->initStorageObjects(); |
| 199 | 198 | } |
| 200 | 199 | |
| 201 | - protected function initStorageObjects() |
|
| 202 | - { |
|
| 200 | + protected function initStorageObjects() { |
|
| 203 | 201 | $this->collections = new ObjectStorage(); |
| 204 | 202 | } |
| 205 | 203 | |
@@ -577,8 +575,7 @@ discard block |
||
| 577 | 575 | * |
| 578 | 576 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> $collections |
| 579 | 577 | */ |
| 580 | - public function getCollections() |
|
| 581 | - { |
|
| 578 | + public function getCollections() { |
|
| 582 | 579 | return $this->collections; |
| 583 | 580 | } |
| 584 | 581 | |
@@ -607,8 +604,7 @@ discard block |
||
| 607 | 604 | * |
| 608 | 605 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> collections |
| 609 | 606 | */ |
| 610 | - public function removeCollection(Collection $collection) |
|
| 611 | - { |
|
| 607 | + public function removeCollection(Collection $collection) { |
|
| 612 | 608 | $this->collections->detach($collection); |
| 613 | 609 | } |
| 614 | 610 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * |
| 62 | 62 | * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference |
| 63 | 63 | */ |
| 64 | - protected $thumbnail = null; |
|
| 64 | + protected $thumbnail = NULL; |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * @var int |