@@ -23,8 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | use StreamDecoratorTrait; |
| 25 | 25 | |
| 26 | - public function emit() |
|
| 27 | - { |
|
| 26 | + public function emit() { |
|
| 28 | 27 | // Disable output buffering |
| 29 | 28 | ob_end_flush(); |
| 30 | 29 | |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | * @subpackage dlf |
| 21 | 21 | * @access public |
| 22 | 22 | */ |
| 23 | -class RstSection |
|
| 24 | -{ |
|
| 23 | +class RstSection { |
|
| 25 | 24 | /** @var string */ |
| 26 | 25 | protected $header = ''; |
| 27 | 26 | |
@@ -31,8 +30,7 @@ discard block |
||
| 31 | 30 | /** @var RstSection[] */ |
| 32 | 31 | protected $subsections = []; |
| 33 | 32 | |
| 34 | - public static function format(string $text, array $format = []) |
|
| 35 | - { |
|
| 33 | + public static function format(string $text, array $format = []) { |
|
| 36 | 34 | if (!empty($text)) { |
| 37 | 35 | if ($format['bold'] ?? false) { |
| 38 | 36 | $text = '**' . $text . '**'; |
@@ -44,8 +42,7 @@ discard block |
||
| 44 | 42 | return $text; |
| 45 | 43 | } |
| 46 | 44 | |
| 47 | - public static function paragraphs(array $paragraphs) |
|
| 48 | - { |
|
| 45 | + public static function paragraphs(array $paragraphs) { |
|
| 49 | 46 | $paragraphs = array_values(array_filter($paragraphs, function ($entry) { |
| 50 | 47 | return !empty($entry); |
| 51 | 48 | })); |
@@ -53,27 +50,23 @@ discard block |
||
| 53 | 50 | return implode("\n\n", $paragraphs); |
| 54 | 51 | } |
| 55 | 52 | |
| 56 | - public function subsection() |
|
| 57 | - { |
|
| 53 | + public function subsection() { |
|
| 58 | 54 | $section = new static(); |
| 59 | 55 | $this->subsections[] = $section; |
| 60 | 56 | return $section; |
| 61 | 57 | } |
| 62 | 58 | |
| 63 | - public function setHeader(string $text) |
|
| 64 | - { |
|
| 59 | + public function setHeader(string $text) { |
|
| 65 | 60 | $this->header = $text; |
| 66 | 61 | } |
| 67 | 62 | |
| 68 | - public function addText(string $text) |
|
| 69 | - { |
|
| 63 | + public function addText(string $text) { |
|
| 70 | 64 | if (!empty($text)) { |
| 71 | 65 | $this->text .= $text . "\n\n"; |
| 72 | 66 | } |
| 73 | 67 | } |
| 74 | 68 | |
| 75 | - public function addTable(array $rows, array $headerRows) |
|
| 76 | - { |
|
| 69 | + public function addTable(array $rows, array $headerRows) { |
|
| 77 | 70 | $numHeaderRows = count($headerRows); |
| 78 | 71 | |
| 79 | 72 | $tableRst = <<<RST |
@@ -115,8 +108,7 @@ discard block |
||
| 115 | 108 | $this->addText($tableRst); |
| 116 | 109 | } |
| 117 | 110 | |
| 118 | - public function render(int $level = 0) |
|
| 119 | - { |
|
| 111 | + public function render(int $level = 0) { |
|
| 120 | 112 | $result = ''; |
| 121 | 113 | |
| 122 | 114 | $result .= $this->renderHeader($level); |
@@ -130,8 +122,7 @@ discard block |
||
| 130 | 122 | return $result; |
| 131 | 123 | } |
| 132 | 124 | |
| 133 | - protected function renderHeader(int $level) |
|
| 134 | - { |
|
| 125 | + protected function renderHeader(int $level) { |
|
| 135 | 126 | $result = ''; |
| 136 | 127 | |
| 137 | 128 | $headerChar = ['=', '=', '-', '~', '"'][$level]; |
@@ -15,12 +15,10 @@ discard block |
||
| 15 | 15 | use TYPO3\CMS\Extbase\Configuration\ConfigurationManager; |
| 16 | 16 | use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; |
| 17 | 17 | |
| 18 | -class StdWrapViewHelper extends AbstractViewHelper |
|
| 19 | -{ |
|
| 18 | +class StdWrapViewHelper extends AbstractViewHelper { |
|
| 20 | 19 | protected $escapeOutput = false; |
| 21 | 20 | |
| 22 | - public function initializeArguments() |
|
| 23 | - { |
|
| 21 | + public function initializeArguments() { |
|
| 24 | 22 | parent::initializeArguments(); |
| 25 | 23 | $this->registerArgument('wrap', 'string', 'The wrap information', true); |
| 26 | 24 | } |
@@ -30,8 +28,7 @@ discard block |
||
| 30 | 28 | * |
| 31 | 29 | * @return string |
| 32 | 30 | */ |
| 33 | - public function render() |
|
| 34 | - { |
|
| 31 | + public function render() { |
|
| 35 | 32 | $wrap = $this->arguments['wrap']; |
| 36 | 33 | |
| 37 | 34 | $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); |
@@ -35,13 +35,11 @@ |
||
| 35 | 35 | * {typoscript -> kitodo:metadataWrapVariable(name: 'wrapInfo')} |
| 36 | 36 | * |
| 37 | 37 | */ |
| 38 | -class MetadataWrapVariableViewHelper extends AbstractViewHelper |
|
| 39 | -{ |
|
| 38 | +class MetadataWrapVariableViewHelper extends AbstractViewHelper { |
|
| 40 | 39 | /** |
| 41 | 40 | * @return void |
| 42 | 41 | */ |
| 43 | - public function initializeArguments() |
|
| 44 | - { |
|
| 42 | + public function initializeArguments() { |
|
| 45 | 43 | $this->registerArgument('name', 'string', 'Name of variable to create', true); |
| 46 | 44 | } |
| 47 | 45 | |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * @subpackage dlf |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class FeedsController extends AbstractController |
|
| 29 | -{ |
|
| 28 | +class FeedsController extends AbstractController { |
|
| 30 | 29 | |
| 31 | 30 | /** |
| 32 | 31 | * @var LibraryRepository |
@@ -36,8 +35,7 @@ discard block |
||
| 36 | 35 | /** |
| 37 | 36 | * @param LibraryRepository $libraryRepository |
| 38 | 37 | */ |
| 39 | - public function injectLibraryRepository(LibraryRepository $libraryRepository) |
|
| 40 | - { |
|
| 38 | + public function injectLibraryRepository(LibraryRepository $libraryRepository) { |
|
| 41 | 39 | $this->libraryRepository = $libraryRepository; |
| 42 | 40 | } |
| 43 | 41 | |
@@ -46,8 +44,7 @@ discard block |
||
| 46 | 44 | * |
| 47 | 45 | * @return void |
| 48 | 46 | */ |
| 49 | - public function initializeAction() |
|
| 50 | - { |
|
| 47 | + public function initializeAction() { |
|
| 51 | 48 | $this->request->setFormat('xml'); |
| 52 | 49 | } |
| 53 | 50 | |
@@ -56,8 +53,7 @@ discard block |
||
| 56 | 53 | * |
| 57 | 54 | * @return void |
| 58 | 55 | */ |
| 59 | - public function mainAction() |
|
| 60 | - { |
|
| 56 | + public function mainAction() { |
|
| 61 | 57 | // access to GET parameter tx_dlf_feeds['collection'] |
| 62 | 58 | $requestData = $this->request->getArguments(); |
| 63 | 59 | |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | * @subpackage dlf |
| 28 | 28 | * @access public |
| 29 | 29 | */ |
| 30 | -class OaiPmhController extends AbstractController |
|
| 31 | -{ |
|
| 30 | +class OaiPmhController extends AbstractController { |
|
| 32 | 31 | /** |
| 33 | 32 | * @var TokenRepository |
| 34 | 33 | */ |
@@ -37,8 +36,7 @@ discard block |
||
| 37 | 36 | /** |
| 38 | 37 | * @param TokenRepository $tokenRepository |
| 39 | 38 | */ |
| 40 | - public function injectTokenRepository(TokenRepository $tokenRepository) |
|
| 41 | - { |
|
| 39 | + public function injectTokenRepository(TokenRepository $tokenRepository) { |
|
| 42 | 40 | $this->tokenRepository = $tokenRepository; |
| 43 | 41 | } |
| 44 | 42 | |
@@ -50,8 +48,7 @@ discard block |
||
| 50 | 48 | /** |
| 51 | 49 | * @param CollectionRepository $collectionRepository |
| 52 | 50 | */ |
| 53 | - public function injectCollectionRepository(CollectionRepository $collectionRepository) |
|
| 54 | - { |
|
| 51 | + public function injectCollectionRepository(CollectionRepository $collectionRepository) { |
|
| 55 | 52 | $this->collectionRepository = $collectionRepository; |
| 56 | 53 | } |
| 57 | 54 | |
@@ -63,8 +60,7 @@ discard block |
||
| 63 | 60 | /** |
| 64 | 61 | * @param LibraryRepository $libraryRepository |
| 65 | 62 | */ |
| 66 | - public function injectLibraryRepository(LibraryRepository $libraryRepository) |
|
| 67 | - { |
|
| 63 | + public function injectLibraryRepository(LibraryRepository $libraryRepository) { |
|
| 68 | 64 | $this->libraryRepository = $libraryRepository; |
| 69 | 65 | } |
| 70 | 66 | |
@@ -73,8 +69,7 @@ discard block |
||
| 73 | 69 | * |
| 74 | 70 | * @return void |
| 75 | 71 | */ |
| 76 | - public function initializeAction() |
|
| 77 | - { |
|
| 72 | + public function initializeAction() { |
|
| 78 | 73 | $this->request->setFormat('xml'); |
| 79 | 74 | } |
| 80 | 75 | |
@@ -122,8 +117,7 @@ discard block |
||
| 122 | 117 | * |
| 123 | 118 | * @return void |
| 124 | 119 | */ |
| 125 | - protected function deleteExpiredTokens() |
|
| 126 | - { |
|
| 120 | + protected function deleteExpiredTokens() { |
|
| 127 | 121 | // Delete expired resumption tokens. |
| 128 | 122 | $this->tokenRepository->deleteExpiredTokens($this->settings['expired']); |
| 129 | 123 | } |
@@ -135,8 +129,7 @@ discard block |
||
| 135 | 129 | * |
| 136 | 130 | * @return void |
| 137 | 131 | */ |
| 138 | - protected function getUrlParams() |
|
| 139 | - { |
|
| 132 | + protected function getUrlParams() { |
|
| 140 | 133 | $allowedParams = [ |
| 141 | 134 | 'verb', |
| 142 | 135 | 'identifier', |
@@ -166,8 +159,7 @@ discard block |
||
| 166 | 159 | * |
| 167 | 160 | * @return array $metadata: The mapped metadata array |
| 168 | 161 | */ |
| 169 | - protected function getDcData(array $record) |
|
| 170 | - { |
|
| 162 | + protected function getDcData(array $record) { |
|
| 171 | 163 | $metadata = []; |
| 172 | 164 | |
| 173 | 165 | $metadata[] = ['dc:identifier' => $record['record_id']]; |
@@ -232,8 +224,7 @@ discard block |
||
| 232 | 224 | * |
| 233 | 225 | * @return string: The fetched METS XML |
| 234 | 226 | */ |
| 235 | - protected function getMetsData(array $record) |
|
| 236 | - { |
|
| 227 | + protected function getMetsData(array $record) { |
|
| 237 | 228 | $mets = null; |
| 238 | 229 | // Load METS file. |
| 239 | 230 | $xml = new \DOMDocument(); |
@@ -256,8 +247,7 @@ discard block |
||
| 256 | 247 | * |
| 257 | 248 | * @return void |
| 258 | 249 | */ |
| 259 | - public function mainAction() |
|
| 260 | - { |
|
| 250 | + public function mainAction() { |
|
| 261 | 251 | // Get allowed GET and POST variables. |
| 262 | 252 | $this->getUrlParams(); |
| 263 | 253 | |
@@ -324,8 +314,7 @@ discard block |
||
| 324 | 314 | * |
| 325 | 315 | * @return void |
| 326 | 316 | */ |
| 327 | - protected function verbGetRecord() |
|
| 328 | - { |
|
| 317 | + protected function verbGetRecord() { |
|
| 329 | 318 | if (count($this->parameters) !== 3 || empty($this->parameters['metadataPrefix']) || empty($this->parameters['identifier'])) { |
| 330 | 319 | $this->error = 'badArgument'; |
| 331 | 320 | return; |
@@ -377,8 +366,7 @@ discard block |
||
| 377 | 366 | * |
| 378 | 367 | * @return void |
| 379 | 368 | */ |
| 380 | - protected function verbIdentify() |
|
| 381 | - { |
|
| 369 | + protected function verbIdentify() { |
|
| 382 | 370 | $library = $this->libraryRepository->findByUid($this->settings['library']); |
| 383 | 371 | |
| 384 | 372 | $oaiIdentifyInfo = []; |
@@ -427,8 +415,7 @@ discard block |
||
| 427 | 415 | * |
| 428 | 416 | * @return void |
| 429 | 417 | */ |
| 430 | - protected function verbListIdentifiers() |
|
| 431 | - { |
|
| 418 | + protected function verbListIdentifiers() { |
|
| 432 | 419 | // If we have a resumption token we can continue our work |
| 433 | 420 | if (!empty($this->parameters['resumptionToken'])) { |
| 434 | 421 | // "resumptionToken" is an exclusive argument. |
@@ -482,8 +469,7 @@ discard block |
||
| 482 | 469 | * |
| 483 | 470 | * @return void |
| 484 | 471 | */ |
| 485 | - protected function verbListMetadataFormats() |
|
| 486 | - { |
|
| 472 | + protected function verbListMetadataFormats() { |
|
| 487 | 473 | $resArray = []; |
| 488 | 474 | // check for the optional "identifier" parameter |
| 489 | 475 | if (isset($this->parameters['identifier'])) { |
@@ -515,8 +501,7 @@ discard block |
||
| 515 | 501 | * |
| 516 | 502 | * @return void |
| 517 | 503 | */ |
| 518 | - protected function verbListRecords() |
|
| 519 | - { |
|
| 504 | + protected function verbListRecords() { |
|
| 520 | 505 | // Check for invalid arguments. |
| 521 | 506 | if (!empty($this->parameters['resumptionToken'])) { |
| 522 | 507 | // "resumptionToken" is an exclusive argument. |
@@ -571,8 +556,7 @@ discard block |
||
| 571 | 556 | * |
| 572 | 557 | * @return void |
| 573 | 558 | */ |
| 574 | - protected function verbListSets() |
|
| 575 | - { |
|
| 559 | + protected function verbListSets() { |
|
| 576 | 560 | // It is required to set a oai_name inside the collection record to be shown in oai-pmh plugin. |
| 577 | 561 | $this->settings['hideEmptyOaiNames'] = true; |
| 578 | 562 | |
@@ -588,8 +572,7 @@ discard block |
||
| 588 | 572 | * |
| 589 | 573 | * @return array|null Array of matching records |
| 590 | 574 | */ |
| 591 | - protected function fetchDocumentUIDs() |
|
| 592 | - { |
|
| 575 | + protected function fetchDocumentUIDs() { |
|
| 593 | 576 | $solr_query = ''; |
| 594 | 577 | // Check "set" for valid value. |
| 595 | 578 | if (!empty($this->parameters['set'])) { |
@@ -698,8 +681,7 @@ discard block |
||
| 698 | 681 | * |
| 699 | 682 | * @return array of enriched records |
| 700 | 683 | */ |
| 701 | - protected function generateOutputForDocumentList(array $documentListSet) |
|
| 702 | - { |
|
| 684 | + protected function generateOutputForDocumentList(array $documentListSet) { |
|
| 703 | 685 | $documentsToProcess = array_splice($documentListSet['elements'], 0, (int) $this->settings['limit']); |
| 704 | 686 | if (empty($documentsToProcess)) { |
| 705 | 687 | $this->error = 'noRecordsMatch'; |
@@ -752,8 +734,7 @@ discard block |
||
| 752 | 734 | * |
| 753 | 735 | * @return void |
| 754 | 736 | */ |
| 755 | - protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) |
|
| 756 | - { |
|
| 737 | + protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) { |
|
| 757 | 738 | // The cursor specifies how many elements have already been returned in previous requests |
| 758 | 739 | // See http://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl |
| 759 | 740 | $currentCursor = $documentListSet['metadata']['cursor']; |
@@ -31,8 +31,7 @@ discard block |
||
| 31 | 31 | * @subpackage dlf |
| 32 | 32 | * @access public |
| 33 | 33 | */ |
| 34 | -class BasketController extends AbstractController |
|
| 35 | -{ |
|
| 34 | +class BasketController extends AbstractController { |
|
| 36 | 35 | /** |
| 37 | 36 | * @var BasketRepository |
| 38 | 37 | */ |
@@ -41,8 +40,7 @@ discard block |
||
| 41 | 40 | /** |
| 42 | 41 | * @param BasketRepository $basketRepository |
| 43 | 42 | */ |
| 44 | - public function injectBasketRepository(BasketRepository $basketRepository) |
|
| 45 | - { |
|
| 43 | + public function injectBasketRepository(BasketRepository $basketRepository) { |
|
| 46 | 44 | $this->basketRepository = $basketRepository; |
| 47 | 45 | } |
| 48 | 46 | |
@@ -54,8 +52,7 @@ discard block |
||
| 54 | 52 | /** |
| 55 | 53 | * @param MailRepository $mailRepository |
| 56 | 54 | */ |
| 57 | - public function injectMailRepository(MailRepository $mailRepository) |
|
| 58 | - { |
|
| 55 | + public function injectMailRepository(MailRepository $mailRepository) { |
|
| 59 | 56 | $this->mailRepository = $mailRepository; |
| 60 | 57 | } |
| 61 | 58 | |
@@ -67,8 +64,7 @@ discard block |
||
| 67 | 64 | /** |
| 68 | 65 | * @param PrinterRepository $printerRepository |
| 69 | 66 | */ |
| 70 | - public function injectPrinterRepository(PrinterRepository $printerRepository) |
|
| 71 | - { |
|
| 67 | + public function injectPrinterRepository(PrinterRepository $printerRepository) { |
|
| 72 | 68 | $this->printerRepository = $printerRepository; |
| 73 | 69 | } |
| 74 | 70 | |
@@ -80,8 +76,7 @@ discard block |
||
| 80 | 76 | /** |
| 81 | 77 | * @param ActionLogRepository $actionLogRepository |
| 82 | 78 | */ |
| 83 | - public function injectActionLogRepository(ActionLogRepository $actionLogRepository) |
|
| 84 | - { |
|
| 79 | + public function injectActionLogRepository(ActionLogRepository $actionLogRepository) { |
|
| 85 | 80 | $this->actionLogRepository = $actionLogRepository; |
| 86 | 81 | } |
| 87 | 82 | |
@@ -90,8 +85,7 @@ discard block |
||
| 90 | 85 | * |
| 91 | 86 | * @return void |
| 92 | 87 | */ |
| 93 | - public function basketAction() |
|
| 94 | - { |
|
| 88 | + public function basketAction() { |
|
| 95 | 89 | $basket = $this->getBasketData(); |
| 96 | 90 | |
| 97 | 91 | // action remove from basket |
@@ -137,8 +131,7 @@ discard block |
||
| 137 | 131 | * |
| 138 | 132 | * @return void |
| 139 | 133 | */ |
| 140 | - public function addAction() |
|
| 141 | - { |
|
| 134 | + public function addAction() { |
|
| 142 | 135 | $basket = $this->getBasketData(); |
| 143 | 136 | |
| 144 | 137 | if ( |
@@ -156,8 +149,7 @@ discard block |
||
| 156 | 149 | * |
| 157 | 150 | * @return void |
| 158 | 151 | */ |
| 159 | - public function mainAction() |
|
| 160 | - { |
|
| 152 | + public function mainAction() { |
|
| 161 | 153 | $basket = $this->getBasketData(); |
| 162 | 154 | |
| 163 | 155 | $countDocs = 0; |
@@ -203,8 +195,7 @@ discard block |
||
| 203 | 195 | * |
| 204 | 196 | * @return Basket The found data from user session. |
| 205 | 197 | */ |
| 206 | - protected function getBasketData() |
|
| 207 | - { |
|
| 198 | + protected function getBasketData() { |
|
| 208 | 199 | // get user session |
| 209 | 200 | $sessionId = $GLOBALS['TSFE']->fe_user->id; |
| 210 | 201 | |
@@ -238,8 +229,7 @@ discard block |
||
| 238 | 229 | * |
| 239 | 230 | * @return string One basket entry |
| 240 | 231 | */ |
| 241 | - protected function getEntry($data) |
|
| 242 | - { |
|
| 232 | + protected function getEntry($data) { |
|
| 243 | 233 | if (is_object($data)) { |
| 244 | 234 | $data = get_object_vars($data); |
| 245 | 235 | } |
@@ -291,8 +281,7 @@ discard block |
||
| 291 | 281 | * |
| 292 | 282 | * @return mixed download url or false |
| 293 | 283 | */ |
| 294 | - protected function getDocumentData($id, $data) |
|
| 295 | - { |
|
| 284 | + protected function getDocumentData($id, $data) { |
|
| 296 | 285 | // get document instance to load further information |
| 297 | 286 | $this->loadDocument(['id' => $id]); |
| 298 | 287 | if ($this->document) { |
@@ -360,8 +349,7 @@ discard block |
||
| 360 | 349 | * |
| 361 | 350 | * @return array Basket data and Javascript output |
| 362 | 351 | */ |
| 363 | - protected function addToBasket($_piVars, $basket) |
|
| 364 | - { |
|
| 352 | + protected function addToBasket($_piVars, $basket) { |
|
| 365 | 353 | $output = ''; |
| 366 | 354 | |
| 367 | 355 | if (!$_piVars['startpage']) { |
@@ -468,8 +456,7 @@ discard block |
||
| 468 | 456 | * |
| 469 | 457 | * @return Basket basket |
| 470 | 458 | */ |
| 471 | - protected function removeFromBasket($_piVars, $basket) |
|
| 472 | - { |
|
| 459 | + protected function removeFromBasket($_piVars, $basket) { |
|
| 473 | 460 | if (!empty($basket->getDocIds())) { |
| 474 | 461 | $items = json_decode($basket->getDocIds()); |
| 475 | 462 | $items = get_object_vars($items); |
@@ -507,8 +494,7 @@ discard block |
||
| 507 | 494 | * |
| 508 | 495 | * @return void |
| 509 | 496 | */ |
| 510 | - protected function sendMail() |
|
| 511 | - { |
|
| 497 | + protected function sendMail() { |
|
| 512 | 498 | // send mail |
| 513 | 499 | $mailId = $this->requestData['mail_action']; |
| 514 | 500 | |
@@ -585,8 +571,7 @@ discard block |
||
| 585 | 571 | * |
| 586 | 572 | * @return void |
| 587 | 573 | */ |
| 588 | - protected function printDocument($basket) |
|
| 589 | - { |
|
| 574 | + protected function printDocument($basket) { |
|
| 590 | 575 | $pdfUrl = $this->settings['pdfprint']; |
| 591 | 576 | $numberOfPages = 0; |
| 592 | 577 | foreach ($this->requestData['selected'] as $docId => $docValue) { |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class CalendarController extends AbstractController |
|
| 30 | -{ |
|
| 29 | +class CalendarController extends AbstractController { |
|
| 31 | 30 | /** |
| 32 | 31 | * @var StructureRepository |
| 33 | 32 | */ |
@@ -36,8 +35,7 @@ discard block |
||
| 36 | 35 | /** |
| 37 | 36 | * @param StructureRepository $structureRepository |
| 38 | 37 | */ |
| 39 | - public function injectStructureRepository(StructureRepository $structureRepository) |
|
| 40 | - { |
|
| 38 | + public function injectStructureRepository(StructureRepository $structureRepository) { |
|
| 41 | 39 | $this->structureRepository = $structureRepository; |
| 42 | 40 | } |
| 43 | 41 | |
@@ -54,8 +52,7 @@ discard block |
||
| 54 | 52 | * |
| 55 | 53 | * @return void |
| 56 | 54 | */ |
| 57 | - public function mainAction() |
|
| 58 | - { |
|
| 55 | + public function mainAction() { |
|
| 59 | 56 | // Set initial document (anchor or year file) if configured. |
| 60 | 57 | if (empty($this->requestData['id']) && !empty($this->settings['initialDocument'])) { |
| 61 | 58 | $this->requestData['id'] = $this->settings['initialDocument']; |
@@ -100,8 +97,7 @@ discard block |
||
| 100 | 97 | * |
| 101 | 98 | * @return void |
| 102 | 99 | */ |
| 103 | - public function calendarAction() |
|
| 104 | - { |
|
| 100 | + public function calendarAction() { |
|
| 105 | 101 | // access arguments passed by the mainAction() |
| 106 | 102 | $mainrequestData = $this->request->getArguments(); |
| 107 | 103 | |
@@ -204,8 +200,7 @@ discard block |
||
| 204 | 200 | * |
| 205 | 201 | * @return void |
| 206 | 202 | */ |
| 207 | - public function yearsAction() |
|
| 208 | - { |
|
| 203 | + public function yearsAction() { |
|
| 209 | 204 | // access arguments passed by the mainAction() |
| 210 | 205 | $mainrequestData = $this->request->getArguments(); |
| 211 | 206 | |
@@ -259,8 +254,7 @@ discard block |
||
| 259 | 254 | * |
| 260 | 255 | * @return string Content for template subpart |
| 261 | 256 | */ |
| 262 | - protected function getCalendarYear($calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) |
|
| 263 | - { |
|
| 257 | + protected function getCalendarYear($calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) { |
|
| 264 | 258 | $calendarData = []; |
| 265 | 259 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
| 266 | 260 | $calendarData[$i] = [ |
@@ -21,15 +21,13 @@ |
||
| 21 | 21 | * @subpackage dlf |
| 22 | 22 | * @access public |
| 23 | 23 | */ |
| 24 | -class StatisticsController extends AbstractController |
|
| 25 | -{ |
|
| 24 | +class StatisticsController extends AbstractController { |
|
| 26 | 25 | /** |
| 27 | 26 | * The main method of the plugin |
| 28 | 27 | * |
| 29 | 28 | * @return void |
| 30 | 29 | */ |
| 31 | - public function mainAction() |
|
| 32 | - { |
|
| 30 | + public function mainAction() { |
|
| 33 | 31 | $countTitles = $this->documentRepository->countAllTitles($this->settings); |
| 34 | 32 | $countVolumes = $this->documentRepository->countAllVolumes($this->settings); |
| 35 | 33 | |