@@ -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 | // extract collection(s) from collection parameter |
@@ -23,8 +23,7 @@ discard block |
||
| 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 | * Method to get the page select values and use them with chash |
| 30 | 29 | * @param \Kitodo\Dlf\Domain\Model\PageSelectForm|NULL $pageSelectForm |
@@ -53,8 +52,7 @@ discard block |
||
| 53 | 52 | * |
| 54 | 53 | * @return void |
| 55 | 54 | */ |
| 56 | - public function mainAction() |
|
| 57 | - { |
|
| 55 | + public function mainAction() { |
|
| 58 | 56 | // Load current document. |
| 59 | 57 | $this->loadDocument($this->requestData); |
| 60 | 58 | if ($this->isDocMissing()) { |
@@ -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 ($this->isDocMissingOrEmpty()) { |
| 58 | 55 | // Quit without doing anything if required variables are not set. |
| 59 | 56 | return ''; |
@@ -91,8 +88,7 @@ discard block |
||
| 91 | 88 | * |
| 92 | 89 | * @return void |
| 93 | 90 | */ |
| 94 | - public function fulltextdownloadtool() |
|
| 95 | - { |
|
| 91 | + public function fulltextdownloadtool() { |
|
| 96 | 92 | if ( |
| 97 | 93 | $this->isDocMissingOrEmpty() |
| 98 | 94 | || empty($this->extConf['fileGrpFulltext']) |
@@ -136,8 +132,7 @@ discard block |
||
| 136 | 132 | * |
| 137 | 133 | * @return void |
| 138 | 134 | */ |
| 139 | - public function fulltexttool() |
|
| 140 | - { |
|
| 135 | + public function fulltexttool() { |
|
| 141 | 136 | if ( |
| 142 | 137 | $this->isDocMissingOrEmpty() |
| 143 | 138 | || empty($this->extConf['fileGrpFulltext']) |
@@ -181,8 +176,7 @@ discard block |
||
| 181 | 176 | * |
| 182 | 177 | * @return void |
| 183 | 178 | */ |
| 184 | - public function imagedownloadtool() |
|
| 185 | - { |
|
| 179 | + public function imagedownloadtool() { |
|
| 186 | 180 | if ( |
| 187 | 181 | $this->isDocMissingOrEmpty() |
| 188 | 182 | || empty($this->settings['fileGrpsImageDownload']) |
@@ -224,8 +218,7 @@ discard block |
||
| 224 | 218 | * |
| 225 | 219 | * @return array Array of image links and image format information |
| 226 | 220 | */ |
| 227 | - protected function getImage($page) |
|
| 228 | - { |
|
| 221 | + protected function getImage($page) { |
|
| 229 | 222 | $image = []; |
| 230 | 223 | // Get @USE value of METS fileGrp. |
| 231 | 224 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->settings['fileGrpsImageDownload']); |
@@ -258,8 +251,7 @@ discard block |
||
| 258 | 251 | * |
| 259 | 252 | * @return void |
| 260 | 253 | */ |
| 261 | - public function imagemanipulationtool() |
|
| 262 | - { |
|
| 254 | + public function imagemanipulationtool() { |
|
| 263 | 255 | // Set parent element for initialization. |
| 264 | 256 | $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool'; |
| 265 | 257 | |
@@ -272,8 +264,7 @@ discard block |
||
| 272 | 264 | * |
| 273 | 265 | * @return void |
| 274 | 266 | */ |
| 275 | - public function pdfdownloadtool() |
|
| 276 | - { |
|
| 267 | + public function pdfdownloadtool() { |
|
| 277 | 268 | if ( |
| 278 | 269 | $this->isDocMissingOrEmpty() |
| 279 | 270 | || empty($this->extConf['fileGrpDownload']) |
@@ -310,8 +301,7 @@ discard block |
||
| 310 | 301 | * |
| 311 | 302 | * @return array Link to downloadable page |
| 312 | 303 | */ |
| 313 | - protected function getPageLink() |
|
| 314 | - { |
|
| 304 | + protected function getPageLink() { |
|
| 315 | 305 | $page1Link = ''; |
| 316 | 306 | $page2Link = ''; |
| 317 | 307 | $pageLinkArray = []; |
@@ -355,8 +345,7 @@ discard block |
||
| 355 | 345 | * |
| 356 | 346 | * @return string Link to downloadable work |
| 357 | 347 | */ |
| 358 | - protected function getWorkLink() |
|
| 359 | - { |
|
| 348 | + protected function getWorkLink() { |
|
| 360 | 349 | $workLink = ''; |
| 361 | 350 | $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']); |
| 362 | 351 | // Get work link. |
@@ -385,8 +374,7 @@ discard block |
||
| 385 | 374 | * |
| 386 | 375 | * @return void |
| 387 | 376 | */ |
| 388 | - public function searchindocumenttool() |
|
| 389 | - { |
|
| 377 | + public function searchindocumenttool() { |
|
| 390 | 378 | if ( |
| 391 | 379 | $this->isDocMissingOrEmpty() |
| 392 | 380 | || empty($this->extConf['fileGrpFulltext']) |
@@ -448,8 +436,7 @@ discard block |
||
| 448 | 436 | * |
| 449 | 437 | * @return string with current document id |
| 450 | 438 | */ |
| 451 | - protected function getCurrentDocumentId() |
|
| 452 | - { |
|
| 439 | + protected function getCurrentDocumentId() { |
|
| 453 | 440 | $id = $this->document->getUid(); |
| 454 | 441 | |
| 455 | 442 | if ($id !== null && $id > 0) { |
@@ -484,8 +471,7 @@ discard block |
||
| 484 | 471 | * |
| 485 | 472 | * @return string with encrypted core name |
| 486 | 473 | */ |
| 487 | - protected function getEncryptedCoreName() |
|
| 488 | - { |
|
| 474 | + protected function getEncryptedCoreName() { |
|
| 489 | 475 | // Get core name. |
| 490 | 476 | $name = Helper::getIndexNameFromUid($this->settings['solrcore'], 'tx_dlf_solrcores'); |
| 491 | 477 | // Encrypt core name. |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * @subpackage dlf |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class AudioplayerController extends AbstractController |
|
| 29 | -{ |
|
| 28 | +class AudioplayerController extends AbstractController { |
|
| 30 | 29 | /** |
| 31 | 30 | * Holds the current audio file's URL, MIME type and optional label |
| 32 | 31 | * |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | * |
| 43 | 42 | * @return void |
| 44 | 43 | */ |
| 45 | - protected function addPlayerJS() |
|
| 46 | - { |
|
| 44 | + protected function addPlayerJS() { |
|
| 47 | 45 | // Inline CSS. |
| 48 | 46 | $inlineCSS = '#tx-dlf-audio { width: 100px; height: 100px; }'; |
| 49 | 47 | |
@@ -72,8 +70,7 @@ discard block |
||
| 72 | 70 | * |
| 73 | 71 | * @return void |
| 74 | 72 | */ |
| 75 | - public function mainAction() |
|
| 76 | - { |
|
| 73 | + public function mainAction() { |
|
| 77 | 74 | // Load current document. |
| 78 | 75 | $this->loadDocument($this->requestData); |
| 79 | 76 | if ($this->isDocMissingOrEmpty()) { |
@@ -44,8 +44,7 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * @param DocumentRepository $documentRepository |
| 46 | 46 | */ |
| 47 | - public function injectDocumentRepository(DocumentRepository $documentRepository) |
|
| 48 | - { |
|
| 47 | + public function injectDocumentRepository(DocumentRepository $documentRepository) { |
|
| 49 | 48 | $this->documentRepository = $documentRepository; |
| 50 | 49 | } |
| 51 | 50 | |
@@ -85,8 +84,7 @@ discard block |
||
| 85 | 84 | * @access protected |
| 86 | 85 | * @return void |
| 87 | 86 | */ |
| 88 | - protected function initialize() |
|
| 89 | - { |
|
| 87 | + protected function initialize() { |
|
| 90 | 88 | $this->requestData = GeneralUtility::_GPmerged('tx_dlf'); |
| 91 | 89 | if (empty($this->requestData['page'])) { |
| 92 | 90 | $this->requestData['page'] = 1; |
@@ -112,8 +110,7 @@ discard block |
||
| 112 | 110 | * |
| 113 | 111 | * @return void |
| 114 | 112 | */ |
| 115 | - protected function loadDocument($requestData) |
|
| 116 | - { |
|
| 113 | + protected function loadDocument($requestData) { |
|
| 117 | 114 | // Try to get document format from database |
| 118 | 115 | if (!empty($requestData['id'])) { |
| 119 | 116 | |
@@ -178,8 +175,7 @@ discard block |
||
| 178 | 175 | * |
| 179 | 176 | * @return boolean |
| 180 | 177 | */ |
| 181 | - protected function isDocMissingOrEmpty() |
|
| 182 | - { |
|
| 178 | + protected function isDocMissingOrEmpty() { |
|
| 183 | 179 | return $this->isDocMissing() || $this->document->getDoc()->numPages < 1; |
| 184 | 180 | } |
| 185 | 181 | |
@@ -188,8 +184,7 @@ discard block |
||
| 188 | 184 | * |
| 189 | 185 | * @return boolean |
| 190 | 186 | */ |
| 191 | - protected function isDocMissing() |
|
| 192 | - { |
|
| 187 | + protected function isDocMissing() { |
|
| 193 | 188 | return $this->document === null || $this->document->getDoc() === null; |
| 194 | 189 | } |
| 195 | 190 | |
@@ -211,8 +206,7 @@ discard block |
||
| 211 | 206 | * |
| 212 | 207 | * @return null|string|array |
| 213 | 208 | */ |
| 214 | - protected function getParametersSafely($parameterName) |
|
| 215 | - { |
|
| 209 | + protected function getParametersSafely($parameterName) { |
|
| 216 | 210 | if ($this->request->hasArgument($parameterName)) { |
| 217 | 211 | return $this->request->getArgument($parameterName); |
| 218 | 212 | } |
@@ -226,8 +220,7 @@ discard block |
||
| 226 | 220 | * |
| 227 | 221 | * @return void |
| 228 | 222 | */ |
| 229 | - public function __construct() |
|
| 230 | - { |
|
| 223 | + public function __construct() { |
|
| 231 | 224 | $this->initialize(); |
| 232 | 225 | } |
| 233 | 226 | } |
@@ -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 | * |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * |
| 40 | 39 | * @return void |
| 41 | 40 | */ |
| 42 | - public function mainAction() |
|
| 43 | - { |
|
| 41 | + public function mainAction() { |
|
| 44 | 42 | // Load current document. |
| 45 | 43 | $this->loadDocument($this->requestData); |
| 46 | 44 | if ($this->isDocMissing()) { |
@@ -63,8 +61,7 @@ discard block |
||
| 63 | 61 | * @access protected |
| 64 | 62 | * @return array HMENU array |
| 65 | 63 | */ |
| 66 | - protected function makeMenuArray() |
|
| 67 | - { |
|
| 64 | + protected function makeMenuArray() { |
|
| 68 | 65 | // Set default values for page if not set. |
| 69 | 66 | // $this->requestData['page'] may be integer or string (physical structure @ID) |
| 70 | 67 | if ( |
@@ -140,8 +137,7 @@ discard block |
||
| 140 | 137 | * |
| 141 | 138 | * @return array HMENU array for menu entry |
| 142 | 139 | */ |
| 143 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
| 144 | - { |
|
| 140 | + protected function getMenuEntry(array $entry, $recursive = false) { |
|
| 145 | 141 | $entry = $this->resolveMenuEntry($entry); |
| 146 | 142 | |
| 147 | 143 | $entryArray = []; |
@@ -235,8 +231,7 @@ discard block |
||
| 235 | 231 | * @param array $entry |
| 236 | 232 | * @return array |
| 237 | 233 | */ |
| 238 | - protected function resolveMenuEntry($entry) |
|
| 239 | - { |
|
| 234 | + protected function resolveMenuEntry($entry) { |
|
| 240 | 235 | // If the menu entry points to the parent document, |
| 241 | 236 | // resolve to the parent UID set on indexation. |
| 242 | 237 | $doc = $this->document->getDoc(); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class PageViewController extends AbstractController |
|
| 30 | -{ |
|
| 29 | +class PageViewController extends AbstractController { |
|
| 31 | 30 | /** |
| 32 | 31 | * Holds the controls to add to the map |
| 33 | 32 | * |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * |
| 66 | 65 | * @return void |
| 67 | 66 | */ |
| 68 | - public function mainAction() |
|
| 69 | - { |
|
| 67 | + public function mainAction() { |
|
| 70 | 68 | // Load current document. |
| 71 | 69 | $this->loadDocument($this->requestData); |
| 72 | 70 | if ($this->isDocMissingOrEmpty()) { |
@@ -118,8 +116,7 @@ discard block |
||
| 118 | 116 | * |
| 119 | 117 | * @return array URL and MIME type of fulltext file |
| 120 | 118 | */ |
| 121 | - protected function getFulltext($page) |
|
| 122 | - { |
|
| 119 | + protected function getFulltext($page) { |
|
| 123 | 120 | $fulltext = []; |
| 124 | 121 | // Get fulltext link. |
| 125 | 122 | $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']); |
@@ -159,8 +156,7 @@ discard block |
||
| 159 | 156 | * |
| 160 | 157 | * @return void |
| 161 | 158 | */ |
| 162 | - protected function addViewerJS() |
|
| 163 | - { |
|
| 159 | + protected function addViewerJS() { |
|
| 164 | 160 | // Viewer configuration. |
| 165 | 161 | $viewerConfiguration = '$(document).ready(function() { |
| 166 | 162 | if (dlfUtils.exists(dlfViewer)) { |
@@ -187,8 +183,7 @@ discard block |
||
| 187 | 183 | * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as |
| 188 | 184 | * some information about the canvas. |
| 189 | 185 | */ |
| 190 | - protected function getAnnotationContainers($page) |
|
| 191 | - { |
|
| 186 | + protected function getAnnotationContainers($page) { |
|
| 192 | 187 | if ($this->document->getDoc() instanceof IiifManifest) { |
| 193 | 188 | $canvasId = $this->document->getDoc()->physicalStructure[$page]; |
| 194 | 189 | $iiif = $this->document->getDoc()->getIiif(); |
@@ -244,8 +239,7 @@ discard block |
||
| 244 | 239 | * |
| 245 | 240 | * @return array URL and MIME type of image file |
| 246 | 241 | */ |
| 247 | - protected function getImage($page) |
|
| 248 | - { |
|
| 242 | + protected function getImage($page) { |
|
| 249 | 243 | $image = []; |
| 250 | 244 | // Get @USE value of METS fileGrp. |
| 251 | 245 | $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['fileGrpImages']); |
@@ -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->isDocMissingOrEmpty() |
@@ -64,8 +62,7 @@ discard block |
||
| 64 | 62 | * |
| 65 | 63 | * @return array The rendered entry ready for fluid |
| 66 | 64 | */ |
| 67 | - protected function getEntry($number, $fileGrpThumbs) |
|
| 68 | - { |
|
| 65 | + protected function getEntry($number, $fileGrpThumbs) { |
|
| 69 | 66 | // Set pagination. |
| 70 | 67 | $entry['pagination'] = htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$number]]['orderlabel']); |
| 71 | 68 | $entry['page'] = $number; |