@@ -23,8 +23,7 @@ discard block |
||
| 23 | 23 | * @subpackage dlf |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 27 | -{ |
|
| 26 | +class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 28 | 27 | public $scriptRelPath = 'Classes/Plugin/PageGrid.php'; |
| 29 | 28 | |
| 30 | 29 | /** |
@@ -37,8 +36,7 @@ discard block |
||
| 37 | 36 | * |
| 38 | 37 | * @return string The rendered entry ready for output |
| 39 | 38 | */ |
| 40 | - protected function getEntry($number, $template) |
|
| 41 | - { |
|
| 39 | + protected function getEntry($number, $template) { |
|
| 42 | 40 | // Set current page if applicable. |
| 43 | 41 | if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) { |
| 44 | 42 | $markerArray['###STATE###'] = 'cur'; |
@@ -81,8 +79,7 @@ discard block |
||
| 81 | 79 | * |
| 82 | 80 | * @return string The rendered page browser ready for output |
| 83 | 81 | */ |
| 84 | - protected function getPageBrowser() |
|
| 85 | - { |
|
| 82 | + protected function getPageBrowser() { |
|
| 86 | 83 | // Get overall number of pages. |
| 87 | 84 | $maxPages = intval(ceil($this->doc->numPages / $this->conf['limit'])); |
| 88 | 85 | // Return empty pagebrowser if there is just one page. |
@@ -132,8 +129,7 @@ discard block |
||
| 132 | 129 | * |
| 133 | 130 | * @return string The content that is displayed on the website |
| 134 | 131 | */ |
| 135 | - public function main($content, $conf) |
|
| 136 | - { |
|
| 132 | + public function main($content, $conf) { |
|
| 137 | 133 | $this->init($conf); |
| 138 | 134 | $this->loadDocument(); |
| 139 | 135 | if ( |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * @subpackage dlf |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class Feeds extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 29 | -{ |
|
| 28 | +class Feeds extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 30 | 29 | public $scriptRelPath = 'Classes/Plugin/Feeds.php'; |
| 31 | 30 | |
| 32 | 31 | /** |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * |
| 40 | 39 | * @return void |
| 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); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class Collection extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 30 | -{ |
|
| 29 | +class Collection extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 31 | 30 | public $scriptRelPath = 'Classes/Plugin/Collection.php'; |
| 32 | 31 | |
| 33 | 32 | /** |
@@ -48,8 +47,7 @@ discard block |
||
| 48 | 47 | * |
| 49 | 48 | * @return string The content that is displayed on the website |
| 50 | 49 | */ |
| 51 | - public function main($content, $conf) |
|
| 52 | - { |
|
| 50 | + public function main($content, $conf) { |
|
| 53 | 51 | $this->init($conf); |
| 54 | 52 | // Turn cache on. |
| 55 | 53 | $this->setCache(true); |
@@ -77,8 +75,7 @@ discard block |
||
| 77 | 75 | * |
| 78 | 76 | * @return string The list of collections ready to output |
| 79 | 77 | */ |
| 80 | - protected function showCollectionList() |
|
| 81 | - { |
|
| 78 | + protected function showCollectionList() { |
|
| 82 | 79 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
| 83 | 80 | ->getQueryBuilderForTable('tx_dlf_collections'); |
| 84 | 81 | |
@@ -257,8 +254,7 @@ discard block |
||
| 257 | 254 | * |
| 258 | 255 | * @return void |
| 259 | 256 | */ |
| 260 | - protected function showSingleCollection($id) |
|
| 261 | - { |
|
| 257 | + protected function showSingleCollection($id) { |
|
| 262 | 258 | $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); |
| 263 | 259 | $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_collections'); |
| 264 | 260 | |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * @subpackage dlf |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class Statistics extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 29 | -{ |
|
| 28 | +class Statistics extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 30 | 29 | public $scriptRelPath = 'Classes/Plugin/Statistics.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 | // Turn cache on. |
| 46 | 44 | $this->setCache(true); |
@@ -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); |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | * @subpackage dlf |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class ItemsProcFunc |
|
| 28 | -{ |
|
| 27 | +class ItemsProcFunc { |
|
| 29 | 28 | /** |
| 30 | 29 | * Helper to get flexform's items array for plugin "Collection" |
| 31 | 30 | * |
@@ -35,8 +34,7 @@ discard block |
||
| 35 | 34 | * |
| 36 | 35 | * @return void |
| 37 | 36 | */ |
| 38 | - public function collectionList(&$params) |
|
| 39 | - { |
|
| 37 | + public function collectionList(&$params) { |
|
| 40 | 38 | $this->generateList( |
| 41 | 39 | $params, |
| 42 | 40 | 'label,uid', |
@@ -54,8 +52,7 @@ discard block |
||
| 54 | 52 | * |
| 55 | 53 | * @return void |
| 56 | 54 | */ |
| 57 | - public function extendedSearchList(&$params) |
|
| 58 | - { |
|
| 55 | + public function extendedSearchList(&$params) { |
|
| 59 | 56 | $this->generateList( |
| 60 | 57 | $params, |
| 61 | 58 | 'label,index_name', |
@@ -74,8 +71,7 @@ discard block |
||
| 74 | 71 | * |
| 75 | 72 | * @return void |
| 76 | 73 | */ |
| 77 | - public function facetsList(&$params) |
|
| 78 | - { |
|
| 74 | + public function facetsList(&$params) { |
|
| 79 | 75 | $this->generateList( |
| 80 | 76 | $params, |
| 81 | 77 | 'label,index_name', |
@@ -98,8 +94,7 @@ discard block |
||
| 98 | 94 | * |
| 99 | 95 | * @return void |
| 100 | 96 | */ |
| 101 | - protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') |
|
| 102 | - { |
|
| 97 | + protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') { |
|
| 103 | 98 | $pages = $params['row']['pages']; |
| 104 | 99 | if (!empty($pages)) { |
| 105 | 100 | if (!is_array($pages)) { |
@@ -140,8 +135,7 @@ discard block |
||
| 140 | 135 | * |
| 141 | 136 | * @return void |
| 142 | 137 | */ |
| 143 | - public function libraryList(&$params) |
|
| 144 | - { |
|
| 138 | + public function libraryList(&$params) { |
|
| 145 | 139 | $this->generateList( |
| 146 | 140 | $params, |
| 147 | 141 | 'label,uid', |
@@ -159,8 +153,7 @@ discard block |
||
| 159 | 153 | * |
| 160 | 154 | * @return void |
| 161 | 155 | */ |
| 162 | - public function solrList(&$params) |
|
| 163 | - { |
|
| 156 | + public function solrList(&$params) { |
|
| 164 | 157 | $this->generateList( |
| 165 | 158 | $params, |
| 166 | 159 | 'label,uid', |
@@ -178,8 +171,7 @@ discard block |
||
| 178 | 171 | * |
| 179 | 172 | * @return void |
| 180 | 173 | */ |
| 181 | - public function toolList(&$params) |
|
| 182 | - { |
|
| 174 | + public function toolList(&$params) { |
|
| 183 | 175 | foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] as $class => $label) { |
| 184 | 176 | $params['items'][] = [$GLOBALS['LANG']->sL($label), $class]; |
| 185 | 177 | } |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | * @subpackage dlf |
| 21 | 21 | * @access public |
| 22 | 22 | */ |
| 23 | -class KitodoProductionHacks |
|
| 24 | -{ |
|
| 23 | +class KitodoProductionHacks { |
|
| 25 | 24 | /** |
| 26 | 25 | * Hook for \Kitodo\Dlf\Common\MetsDocument::establishRecordId() |
| 27 | 26 | * When using Kitodo.Production the record identifier is saved only in MODS, but not |
@@ -34,8 +33,7 @@ discard block |
||
| 34 | 33 | * |
| 35 | 34 | * @return void |
| 36 | 35 | */ |
| 37 | - public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id) |
|
| 38 | - { |
|
| 36 | + public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id) { |
|
| 39 | 37 | if (!$record_id) { |
| 40 | 38 | $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
| 41 | 39 | // Get all logical structure nodes with metadata, but without associated METS-Pointers. |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | * @subpackage dlf |
| 28 | 28 | * @access public |
| 29 | 29 | */ |
| 30 | -class NewTenant extends \Kitodo\Dlf\Common\AbstractModule |
|
| 31 | -{ |
|
| 30 | +class NewTenant extends \Kitodo\Dlf\Common\AbstractModule { |
|
| 32 | 31 | protected $markerArray = [ |
| 33 | 32 | 'CSH' => '', |
| 34 | 33 | 'MOD_MENU' => '', |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | * |
| 43 | 42 | * @return void |
| 44 | 43 | */ |
| 45 | - protected function cmdAddMetadata() |
|
| 46 | - { |
|
| 44 | + protected function cmdAddMetadata() { |
|
| 47 | 45 | // Include metadata definition file. |
| 48 | 46 | $metadataDefaults = include (ExtensionManagementUtility::extPath($this->extKey) . 'Resources/Private/Data/MetadataDefaults.php'); |
| 49 | 47 | $i = 0; |
@@ -100,8 +98,7 @@ discard block |
||
| 100 | 98 | * |
| 101 | 99 | * @return void |
| 102 | 100 | */ |
| 103 | - protected function cmdAddSolrCore() |
|
| 104 | - { |
|
| 101 | + protected function cmdAddSolrCore() { |
|
| 105 | 102 | // Build data array. |
| 106 | 103 | $data['tx_dlf_solrcores'][uniqid('NEW')] = [ |
| 107 | 104 | 'pid' => intval($this->id), |
@@ -134,8 +131,7 @@ discard block |
||
| 134 | 131 | * |
| 135 | 132 | * @return void |
| 136 | 133 | */ |
| 137 | - protected function cmdAddStructure() |
|
| 138 | - { |
|
| 134 | + protected function cmdAddStructure() { |
|
| 139 | 135 | // Include structure definition file. |
| 140 | 136 | $structureDefaults = include (ExtensionManagementUtility::extPath($this->extKey) . 'Resources/Private/Data/StructureDefaults.php'); |
| 141 | 137 | // Build data array. |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | * @subpackage dlf |
| 21 | 21 | * @access public |
| 22 | 22 | */ |
| 23 | -class Alto implements \Kitodo\Dlf\Common\FulltextInterface |
|
| 24 | -{ |
|
| 23 | +class Alto implements \Kitodo\Dlf\Common\FulltextInterface { |
|
| 25 | 24 | /** |
| 26 | 25 | * This extracts the fulltext data from ALTO XML |
| 27 | 26 | * |
@@ -31,8 +30,7 @@ discard block |
||
| 31 | 30 | * |
| 32 | 31 | * @return string The raw unformatted fulltext |
| 33 | 32 | */ |
| 34 | - public function getRawText(\SimpleXMLElement $xml) |
|
| 35 | - { |
|
| 33 | + public function getRawText(\SimpleXMLElement $xml) { |
|
| 36 | 34 | $rawText = ''; |
| 37 | 35 | $xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v2#'); |
| 38 | 36 | // Get all (presumed) words of the text. |