@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * @subpackage dlf |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class Basket extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 29 | -{ |
|
| 28 | +class Basket extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 30 | 29 | public $scriptRelPath = 'Classes/Plugin/Basket.php'; |
| 31 | 30 | |
| 32 | 31 | /** |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * |
| 40 | 39 | * @return string The content that is displayed on the website |
| 41 | 40 | */ |
| 42 | - public function main($content, $conf) |
|
| 43 | - { |
|
| 41 | + public function main($content, $conf) { |
|
| 44 | 42 | $this->init($conf); |
| 45 | 43 | // Don't cache the output. |
| 46 | 44 | $this->setCache(false); |
@@ -233,8 +231,7 @@ discard block |
||
| 233 | 231 | * |
| 234 | 232 | * @return string One basket entry |
| 235 | 233 | */ |
| 236 | - protected function getEntry($data, $template) |
|
| 237 | - { |
|
| 234 | + protected function getEntry($data, $template) { |
|
| 238 | 235 | if (is_object($data)) { |
| 239 | 236 | $data = get_object_vars($data); |
| 240 | 237 | } |
@@ -282,8 +279,7 @@ discard block |
||
| 282 | 279 | * |
| 283 | 280 | * @return array Basket data and Javascript output |
| 284 | 281 | */ |
| 285 | - protected function addToBasket($_piVars, $basketData) |
|
| 286 | - { |
|
| 282 | + protected function addToBasket($_piVars, $basketData) { |
|
| 287 | 283 | $output = ''; |
| 288 | 284 | if (!$_piVars['startpage']) { |
| 289 | 285 | $page = 0; |
@@ -375,8 +371,7 @@ discard block |
||
| 375 | 371 | * |
| 376 | 372 | * @return array basket data |
| 377 | 373 | */ |
| 378 | - protected function removeFromBasket($_piVars, $basketData) |
|
| 379 | - { |
|
| 374 | + protected function removeFromBasket($_piVars, $basketData) { |
|
| 380 | 375 | if (!empty($basketData['doc_ids'])) { |
| 381 | 376 | $items = $basketData['doc_ids']; |
| 382 | 377 | $items = get_object_vars($items); |
@@ -415,8 +410,7 @@ discard block |
||
| 415 | 410 | * |
| 416 | 411 | * @return array basket data |
| 417 | 412 | */ |
| 418 | - protected function openFromBasket($_piVars, $basketData) |
|
| 419 | - { |
|
| 413 | + protected function openFromBasket($_piVars, $basketData) { |
|
| 420 | 414 | $pdfUrl = $this->conf['pdfgenerate']; |
| 421 | 415 | foreach ($this->piVars['selected'] as $docValue) { |
| 422 | 416 | if ($docValue['id']) { |
@@ -438,8 +432,7 @@ discard block |
||
| 438 | 432 | * |
| 439 | 433 | * @return mixed download url or false |
| 440 | 434 | */ |
| 441 | - protected function getDocumentData($id, $data) |
|
| 442 | - { |
|
| 435 | + protected function getDocumentData($id, $data) { |
|
| 443 | 436 | // get document instance to load further information |
| 444 | 437 | $document = Document::getInstance($id, 0); |
| 445 | 438 | if ($document) { |
@@ -499,8 +492,7 @@ discard block |
||
| 499 | 492 | * |
| 500 | 493 | * @return void |
| 501 | 494 | */ |
| 502 | - protected function sendMail() |
|
| 503 | - { |
|
| 495 | + protected function sendMail() { |
|
| 504 | 496 | // send mail |
| 505 | 497 | $mailId = $this->piVars['mail_action']; |
| 506 | 498 | |
@@ -590,8 +582,7 @@ discard block |
||
| 590 | 582 | * |
| 591 | 583 | * @return void |
| 592 | 584 | */ |
| 593 | - protected function printDocument() |
|
| 594 | - { |
|
| 585 | + protected function printDocument() { |
|
| 595 | 586 | $pdfUrl = $this->conf['pdfprint']; |
| 596 | 587 | $numberOfPages = 0; |
| 597 | 588 | foreach ($this->piVars['selected'] as $docId => $docValue) { |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | * @subpackage dlf |
| 30 | 30 | * @access public |
| 31 | 31 | */ |
| 32 | -class ListView extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 33 | -{ |
|
| 32 | +class ListView extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 34 | 33 | public $scriptRelPath = 'Classes/Plugin/ListView.php'; |
| 35 | 34 | |
| 36 | 35 | /** |
@@ -72,8 +71,7 @@ discard block |
||
| 72 | 71 | * |
| 73 | 72 | * @return string The rendered page browser ready for output |
| 74 | 73 | */ |
| 75 | - protected function getPageBrowser() |
|
| 76 | - { |
|
| 74 | + protected function getPageBrowser() { |
|
| 77 | 75 | // Get overall number of pages. |
| 78 | 76 | $maxPages = intval(ceil($this->list->metadata['options']['numberOfToplevelHits'] / $this->conf['limit'])); |
| 79 | 77 | // Return empty pagebrowser if there is just one page. |
@@ -124,8 +122,7 @@ discard block |
||
| 124 | 122 | * |
| 125 | 123 | * @return string The rendered entry ready for output |
| 126 | 124 | */ |
| 127 | - protected function getEntry($number, $template) |
|
| 128 | - { |
|
| 125 | + protected function getEntry($number, $template) { |
|
| 129 | 126 | $markerArray['###NUMBER###'] = ($this->piVars['pointer'] * $this->conf['limit']) + $number + 1; |
| 130 | 127 | $markerArray['###METADATA###'] = ''; |
| 131 | 128 | $markerArray['###THUMBNAIL###'] = ''; |
@@ -227,8 +224,7 @@ discard block |
||
| 227 | 224 | * |
| 228 | 225 | * @return array The parsed fieldwrap |
| 229 | 226 | */ |
| 230 | - private function getFieldWrap($index_name, $wrap) |
|
| 231 | - { |
|
| 227 | + private function getFieldWrap($index_name, $wrap) { |
|
| 232 | 228 | if (isset($this->fieldwrap[$index_name])) { |
| 233 | 229 | return $this->fieldwrap[$index_name]; |
| 234 | 230 | } else { |
@@ -243,8 +239,7 @@ discard block |
||
| 243 | 239 | * |
| 244 | 240 | * @return string The rendered sorting dialog ready for output |
| 245 | 241 | */ |
| 246 | - protected function getSortingForm() |
|
| 247 | - { |
|
| 242 | + protected function getSortingForm() { |
|
| 248 | 243 | // Return nothing if there are no sortable metadata fields. |
| 249 | 244 | if (!count($this->sortables)) { |
| 250 | 245 | return ''; |
@@ -295,8 +290,7 @@ discard block |
||
| 295 | 290 | * |
| 296 | 291 | * @return string The rendered entries ready for output |
| 297 | 292 | */ |
| 298 | - protected function getSubEntries($number, $template) |
|
| 299 | - { |
|
| 293 | + protected function getSubEntries($number, $template) { |
|
| 300 | 294 | $content = ''; |
| 301 | 295 | $noTitle = $this->pi_getLL('noTitle'); |
| 302 | 296 | $highlight_word = preg_replace('/\s\s+/', ';', $this->list->metadata['searchString']); |
@@ -399,8 +393,7 @@ discard block |
||
| 399 | 393 | * |
| 400 | 394 | * @return void |
| 401 | 395 | */ |
| 402 | - protected function loadConfig() |
|
| 403 | - { |
|
| 396 | + protected function loadConfig() { |
|
| 404 | 397 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 405 | 398 | ->getQueryBuilderForTable('tx_dlf_metadata'); |
| 406 | 399 | |
@@ -446,8 +439,7 @@ discard block |
||
| 446 | 439 | * |
| 447 | 440 | * @return string The content that is displayed on the website |
| 448 | 441 | */ |
| 449 | - public function main($content, $conf) |
|
| 450 | - { |
|
| 442 | + public function main($content, $conf) { |
|
| 451 | 443 | $this->init($conf); |
| 452 | 444 | // Don't cache the output. |
| 453 | 445 | $this->setCache(false); |
@@ -23,8 +23,7 @@ discard block |
||
| 23 | 23 | * @subpackage dlf |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 27 | -{ |
|
| 26 | +class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 28 | 27 | public $scriptRelPath = 'Classes/Plugin/Navigation.php'; |
| 29 | 28 | |
| 30 | 29 | /** |
@@ -34,8 +33,7 @@ discard block |
||
| 34 | 33 | * |
| 35 | 34 | * @return string Link to the list view ready to output |
| 36 | 35 | */ |
| 37 | - protected function getLinkToListview() |
|
| 38 | - { |
|
| 36 | + protected function getLinkToListview() { |
|
| 39 | 37 | if (!empty($this->conf['targetPid'])) { |
| 40 | 38 | // Load the list. |
| 41 | 39 | $list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(DocumentList::class); |
@@ -61,8 +59,7 @@ discard block |
||
| 61 | 59 | * |
| 62 | 60 | * @return string Page selector ready to output |
| 63 | 61 | */ |
| 64 | - protected function getPageSelector() |
|
| 65 | - { |
|
| 62 | + protected function getPageSelector() { |
|
| 66 | 63 | // Configure @action URL for form. |
| 67 | 64 | $linkConf = [ |
| 68 | 65 | 'parameter' => $GLOBALS['TSFE']->id, |
@@ -96,8 +93,7 @@ discard block |
||
| 96 | 93 | * |
| 97 | 94 | * @return string The content that is displayed on the website |
| 98 | 95 | */ |
| 99 | - public function main($content, $conf) |
|
| 100 | - { |
|
| 96 | + public function main($content, $conf) { |
|
| 101 | 97 | $this->init($conf); |
| 102 | 98 | // Turn cache on. |
| 103 | 99 | $this->setCache(true); |
@@ -212,8 +208,7 @@ discard block |
||
| 212 | 208 | * |
| 213 | 209 | * @return string Typolink ready to output |
| 214 | 210 | */ |
| 215 | - protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') |
|
| 216 | - { |
|
| 211 | + protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') { |
|
| 217 | 212 | // Merge plugin variables with new set of values. |
| 218 | 213 | if (is_array($this->piVars)) { |
| 219 | 214 | $piVars = $this->piVars; |