@@ -53,7 +53,7 @@ |
||
| 53 | 53 | // Load current document. |
| 54 | 54 | $this->loadDocument(); |
| 55 | 55 | if ( |
| 56 | - $this->doc === null |
|
| 56 | + $this->doc === NULL |
|
| 57 | 57 | || $this->doc->numPages < 1 |
| 58 | 58 | || empty($this->conf['fileGrpFulltext']) |
| 59 | 59 | || empty($this->conf['solrcore']) |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | protected function addSearchInDocumentJS() |
| 126 | 126 | { |
| 127 | 127 | $pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); |
| 128 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/Search/SearchInDocument.js'); |
|
| 128 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Javascript/Search/SearchInDocument.js'); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | * @subpackage dlf |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 28 | -{ |
|
| 27 | +class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 29 | 28 | public $scriptRelPath = 'Classes/Plugin/Tools/SearchInDocumentTool.php'; |
| 30 | 29 | |
| 31 | 30 | /** |
@@ -38,8 +37,7 @@ discard block |
||
| 38 | 37 | * |
| 39 | 38 | * @return string The content that is displayed on the website |
| 40 | 39 | */ |
| 41 | - public function main($content, $conf) |
|
| 42 | - { |
|
| 40 | + public function main($content, $conf) { |
|
| 43 | 41 | |
| 44 | 42 | $this->init($conf); |
| 45 | 43 | |
@@ -122,8 +120,7 @@ discard block |
||
| 122 | 120 | * |
| 123 | 121 | * @return void |
| 124 | 122 | */ |
| 125 | - protected function addSearchInDocumentJS() |
|
| 126 | - { |
|
| 123 | + protected function addSearchInDocumentJS() { |
|
| 127 | 124 | $pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); |
| 128 | 125 | $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/Search/SearchInDocument.js'); |
| 129 | 126 | } |
@@ -135,8 +132,7 @@ discard block |
||
| 135 | 132 | * |
| 136 | 133 | * @return array with encrypted core name and hash |
| 137 | 134 | */ |
| 138 | - protected function getEncryptedCoreName() |
|
| 139 | - { |
|
| 135 | + protected function getEncryptedCoreName() { |
|
| 140 | 136 | // Get core name. |
| 141 | 137 | $name = Helper::getIndexNameFromUid($this->conf['solrcore'], 'tx_dlf_solrcores'); |
| 142 | 138 | // Encrypt core name. |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | // Load current document. |
| 81 | 81 | $this->loadDocument(); |
| 82 | 82 | if ( |
| 83 | - $this->doc === null |
|
| 83 | + $this->doc === NULL |
|
| 84 | 84 | || $this->doc->numPages < 1 |
| 85 | 85 | ) { |
| 86 | 86 | // Quit without doing anything if required variables are not set. |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | $(document).ready(function() { |
| 61 | 61 | AudioPlayer = new dlfAudioPlayer({ |
| 62 | 62 | audio: { |
| 63 | - mimeType: "' . $this->audio['mimetype'] . '", |
|
| 64 | - title: "' . $this->audio['label'] . '", |
|
| 65 | - url: "' . $this->audio['url'] . '" |
|
| 63 | + mimeType: "' . $this->audio['mimetype'].'", |
|
| 64 | + title: "' . $this->audio['label'].'", |
|
| 65 | + url: "' . $this->audio['url'].'" |
|
| 66 | 66 | }, |
| 67 | 67 | parentElId: "tx-dlf-audio", |
| 68 | - swfPath: "' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 68 | + swfPath: "' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 69 | 69 | }); |
| 70 | 70 | }); |
| 71 | 71 | '; |
@@ -73,22 +73,22 @@ discard block |
||
| 73 | 73 | if (empty($this->conf['addJStoBody'])) { |
| 74 | 74 | $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); |
| 75 | 75 | foreach ($cssFiles as $cssFile) { |
| 76 | - $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . $cssFile); |
|
| 76 | + $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).$cssFile); |
|
| 77 | 77 | } |
| 78 | 78 | $pageRenderer->addCssInlineBlock('kitodo-audioplayer-configuration', $inlineCSS); |
| 79 | 79 | foreach ($jsFiles as $jsFile) { |
| 80 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . $jsFile); |
|
| 80 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).$jsFile); |
|
| 81 | 81 | } |
| 82 | 82 | $pageRenderer->addJsFooterInlineCode('kitodo-audioplayer-configuration', $audioplayerConfiguration); |
| 83 | 83 | } else { |
| 84 | 84 | foreach ($jsFiles as $jsFile) { |
| 85 | - $markerArray .= '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . $jsFile . '"></script>' . "\n"; |
|
| 85 | + $markerArray .= '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).$jsFile.'"></script>'."\n"; |
|
| 86 | 86 | } |
| 87 | 87 | $markerArray .= ' |
| 88 | 88 | <script type="text/javascript"> |
| 89 | 89 | /*<![CDATA[*/ |
| 90 | 90 | /*kitodo-audioplayer-configuration*/ |
| 91 | - ' . $audioplayerConfiguration . ' |
|
| 91 | + ' . $audioplayerConfiguration.' |
|
| 92 | 92 | /*]]>*/ |
| 93 | 93 | </script>'; |
| 94 | 94 | } |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | * @subpackage dlf |
| 21 | 21 | * @access public |
| 22 | 22 | */ |
| 23 | -class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 24 | -{ |
|
| 23 | +class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 25 | 24 | public $scriptRelPath = 'Classes/Plugin/AudioPlayer.php'; |
| 26 | 25 | |
| 27 | 26 | /** |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * |
| 40 | 39 | * @return string The output string for the ###JAVASCRIPT### template marker |
| 41 | 40 | */ |
| 42 | - protected function addPlayerJS() |
|
| 43 | - { |
|
| 41 | + protected function addPlayerJS() { |
|
| 44 | 42 | $markerArray = ''; |
| 45 | 43 | // CSS files. |
| 46 | 44 | $cssFiles = [ |
@@ -105,8 +103,7 @@ discard block |
||
| 105 | 103 | * |
| 106 | 104 | * @return string The content that is displayed on the website |
| 107 | 105 | */ |
| 108 | - public function main($content, $conf) |
|
| 109 | - { |
|
| 106 | + public function main($content, $conf) { |
|
| 110 | 107 | $this->init($conf); |
| 111 | 108 | // Load current document. |
| 112 | 109 | $this->loadDocument(); |
@@ -119,14 +119,14 @@ discard block |
||
| 119 | 119 | $markerArray = []; |
| 120 | 120 | if ($this->piVars['id']) { |
| 121 | 121 | if ($this->conf['crop']) { |
| 122 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="' . $this->pi_getLL('editMode', '', true) . '">' . $this->pi_getLL('editMode', '', true) . '</a>'; |
|
| 123 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="' . $this->pi_getLL('editRemove', '', true) . '">' . $this->pi_getLL('editRemove', '', true) . '</a>'; |
|
| 122 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="' . $this->pi_getLL('editMode', '', TRUE) . '">' . $this->pi_getLL('editMode', '', TRUE) . '</a>'; |
|
| 123 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="' . $this->pi_getLL('editRemove', '', TRUE) . '">' . $this->pi_getLL('editRemove', '', TRUE) . '</a>'; |
|
| 124 | 124 | } else { |
| 125 | 125 | $markerArray['###EDITBUTTON###'] = ''; |
| 126 | 126 | $markerArray['###EDITREMOVE###'] = ''; |
| 127 | 127 | } |
| 128 | 128 | if ($this->conf['magnifier']) { |
| 129 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="' . $this->pi_getLL('magnifier', '', true) . '">' . $this->pi_getLL('magnifier', '', true) . '</a>'; |
|
| 129 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="' . $this->pi_getLL('magnifier', '', TRUE) . '">' . $this->pi_getLL('magnifier', '', TRUE) . '</a>'; |
|
| 130 | 130 | } else { |
| 131 | 131 | $markerArray['###MAGNIFIER###'] = ''; |
| 132 | 132 | } |
@@ -146,10 +146,10 @@ discard block |
||
| 146 | 146 | $markerArray = []; |
| 147 | 147 | // Add basket button |
| 148 | 148 | if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
| 149 | - $label = $this->pi_getLL('addBasket', '', true); |
|
| 149 | + $label = $this->pi_getLL('addBasket', '', TRUE); |
|
| 150 | 150 | $params = [ |
| 151 | 151 | 'id' => $this->piVars['id'], |
| 152 | - 'addToBasket' => true |
|
| 152 | + 'addToBasket' => TRUE |
|
| 153 | 153 | ]; |
| 154 | 154 | if (empty($this->piVars['page'])) { |
| 155 | 155 | $params['page'] = 1; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | 'parameter' => $this->conf['targetBasket'], |
| 159 | 159 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
| 160 | 160 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
| 161 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', true, false), |
|
| 161 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
|
| 162 | 162 | 'title' => $label |
| 163 | 163 | ]; |
| 164 | 164 | $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">'; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | if ($iiif instanceof ManifestInterface) { |
| 268 | 268 | $canvas = $iiif->getContainedResourceById($canvasId); |
| 269 | 269 | /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */ |
| 270 | - if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) { |
|
| 270 | + if ($canvas != NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) { |
|
| 271 | 271 | $annotationContainers = []; |
| 272 | 272 | /* |
| 273 | 273 | * TODO Analyzing the annotations on the server side requires loading the annotation lists / pages |
@@ -277,11 +277,11 @@ discard block |
||
| 277 | 277 | * On the other hand, server connections are potentially better than client connections. Downloading annotation lists |
| 278 | 278 | */ |
| 279 | 279 | foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) { |
| 280 | - if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) { |
|
| 280 | + if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) { |
|
| 281 | 281 | foreach ($textAnnotations as $annotation) { |
| 282 | 282 | if ( |
| 283 | 283 | $annotation->getBody()->getFormat() == 'text/plain' |
| 284 | - && $annotation->getBody()->getChars() != null |
|
| 284 | + && $annotation->getBody()->getChars() != NULL |
|
| 285 | 285 | ) { |
| 286 | 286 | $annotationListData = []; |
| 287 | 287 | $annotationListData['uri'] = $annotationContainer->getId(); |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | // Load current document. |
| 324 | 324 | $this->loadDocument(); |
| 325 | 325 | if ( |
| 326 | - $this->doc === null |
|
| 326 | + $this->doc === NULL |
|
| 327 | 327 | || $this->doc->numPages < 1 |
| 328 | 328 | ) { |
| 329 | 329 | // Quit without doing anything if required variables are not set. |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | $(document).ready(function() { |
| 98 | 98 | if (dlfUtils.exists(dlfViewer)) { |
| 99 | 99 | tx_dlf_viewer = new dlfViewer({ |
| 100 | - controls: ["' . implode('", "', $this->controls) . '"], |
|
| 101 | - div: "' . $this->conf['elementId'] . '", |
|
| 102 | - images: ' . json_encode($this->images) . ', |
|
| 103 | - fulltexts: ' . json_encode($this->fulltexts) . ', |
|
| 104 | - annotationContainers: ' . json_encode($this->annotationContainers) . ', |
|
| 105 | - useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0) . ' |
|
| 100 | + controls: ["' . implode('", "', $this->controls).'"], |
|
| 101 | + div: "' . $this->conf['elementId'].'", |
|
| 102 | + images: ' . json_encode($this->images).', |
|
| 103 | + fulltexts: ' . json_encode($this->fulltexts).', |
|
| 104 | + annotationContainers: ' . json_encode($this->annotationContainers).', |
|
| 105 | + useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0).' |
|
| 106 | 106 | }); |
| 107 | 107 | } |
| 108 | 108 | }); |
@@ -111,21 +111,21 @@ discard block |
||
| 111 | 111 | if (empty($this->conf['addJStoBody'])) { |
| 112 | 112 | $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class); |
| 113 | 113 | foreach ($cssFiles as $cssFile) { |
| 114 | - $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . $cssFile); |
|
| 114 | + $pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).$cssFile); |
|
| 115 | 115 | } |
| 116 | 116 | foreach ($jsFiles as $jsFile) { |
| 117 | - $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . $jsFile); |
|
| 117 | + $pageRenderer->addJsFooterFile(\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).$jsFile); |
|
| 118 | 118 | } |
| 119 | 119 | $pageRenderer->addJsFooterInlineCode('kitodo-pageview-configuration', $viewerConfiguration); |
| 120 | 120 | } else { |
| 121 | 121 | foreach ($jsFiles as $jsFile) { |
| 122 | - $markerArray .= '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . $jsFile . '"></script>' . "\n"; |
|
| 122 | + $markerArray .= '<script type="text/javascript" src="'.\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).$jsFile.'"></script>'."\n"; |
|
| 123 | 123 | } |
| 124 | 124 | $markerArray .= ' |
| 125 | 125 | <script type="text/javascript"> |
| 126 | 126 | /*<![CDATA[*/ |
| 127 | 127 | /*kitodo-pageview-configuration*/ |
| 128 | - ' . $viewerConfiguration . ' |
|
| 128 | + ' . $viewerConfiguration.' |
|
| 129 | 129 | /*]]>*/ |
| 130 | 130 | </script>'; |
| 131 | 131 | } |
@@ -144,14 +144,14 @@ discard block |
||
| 144 | 144 | $markerArray = []; |
| 145 | 145 | if ($this->piVars['id']) { |
| 146 | 146 | if ($this->conf['crop']) { |
| 147 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="' . $this->pi_getLL('editMode', '', true) . '">' . $this->pi_getLL('editMode', '', true) . '</a>'; |
|
| 148 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="' . $this->pi_getLL('editRemove', '', true) . '">' . $this->pi_getLL('editRemove', '', true) . '</a>'; |
|
| 147 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="'.$this->pi_getLL('editMode', '', true).'">'.$this->pi_getLL('editMode', '', true).'</a>'; |
|
| 148 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="'.$this->pi_getLL('editRemove', '', true).'">'.$this->pi_getLL('editRemove', '', true).'</a>'; |
|
| 149 | 149 | } else { |
| 150 | 150 | $markerArray['###EDITBUTTON###'] = ''; |
| 151 | 151 | $markerArray['###EDITREMOVE###'] = ''; |
| 152 | 152 | } |
| 153 | 153 | if ($this->conf['magnifier']) { |
| 154 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="' . $this->pi_getLL('magnifier', '', true) . '">' . $this->pi_getLL('magnifier', '', true) . '</a>'; |
|
| 154 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="'.$this->pi_getLL('magnifier', '', true).'">'.$this->pi_getLL('magnifier', '', true).'</a>'; |
|
| 155 | 155 | } else { |
| 156 | 156 | $markerArray['###MAGNIFIER###'] = ''; |
| 157 | 157 | } |
@@ -186,15 +186,15 @@ discard block |
||
| 186 | 186 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', true, false), |
| 187 | 187 | 'title' => $label |
| 188 | 188 | ]; |
| 189 | - $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">'; |
|
| 190 | - $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . $this->piVars['page'] . '">'; |
|
| 191 | - $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . $this->piVars['page'] . '">'; |
|
| 189 | + $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
| 190 | + $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">'; |
|
| 191 | + $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">'; |
|
| 192 | 192 | $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
| 193 | 193 | $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">'; |
| 194 | 194 | $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">'; |
| 195 | 195 | $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">'; |
| 196 | 196 | $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
| 197 | - $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>'; |
|
| 197 | + $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
| 198 | 198 | $output .= '</form>'; |
| 199 | 199 | $output .= '<script>'; |
| 200 | 200 | $output .= '$(document).ready(function() { $("#submitBasketForm").click(function() { $("#addToBasketForm").submit(); }); });'; |
@@ -230,14 +230,14 @@ discard block |
||
| 230 | 230 | 'parameter' => $GLOBALS['TSFE']->id, |
| 231 | 231 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
| 232 | 232 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
| 233 | - 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($image['url']), |
|
| 233 | + 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($image['url']), |
|
| 234 | 234 | ]; |
| 235 | 235 | $image['url'] = $this->cObj->typoLink_URL($linkConf); |
| 236 | 236 | } |
| 237 | 237 | $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]); |
| 238 | 238 | break; |
| 239 | 239 | } else { |
| 240 | - Helper::devLog('File not found in fileGrp "' . $fileGrp . '"', DEVLOG_SEVERITY_WARNING); |
|
| 240 | + Helper::devLog('File not found in fileGrp "'.$fileGrp.'"', DEVLOG_SEVERITY_WARNING); |
|
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | return $image; |
@@ -264,13 +264,13 @@ discard block |
||
| 264 | 264 | 'parameter' => $GLOBALS['TSFE']->id, |
| 265 | 265 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
| 266 | 266 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
| 267 | - 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($fulltext['url']), |
|
| 267 | + 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($fulltext['url']), |
|
| 268 | 268 | ]; |
| 269 | 269 | $fulltext['url'] = $this->cObj->typoLink_URL($linkConf); |
| 270 | 270 | } |
| 271 | 271 | $fulltext['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']]); |
| 272 | 272 | } else { |
| 273 | - Helper::devLog('File not found in fileGrp "' . $this->conf['fileGrpFulltext'] . '"', DEVLOG_SEVERITY_WARNING); |
|
| 273 | + Helper::devLog('File not found in fileGrp "'.$this->conf['fileGrpFulltext'].'"', DEVLOG_SEVERITY_WARNING); |
|
| 274 | 274 | } |
| 275 | 275 | return $fulltext; |
| 276 | 276 | } |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * @subpackage dlf |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class PageView extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 29 | -{ |
|
| 28 | +class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 30 | 29 | public $scriptRelPath = 'Classes/Plugin/PageView.php'; |
| 31 | 30 | |
| 32 | 31 | /** |
@@ -68,8 +67,7 @@ discard block |
||
| 68 | 67 | * |
| 69 | 68 | * @return string The output string for the ###JAVASCRIPT### template marker |
| 70 | 69 | */ |
| 71 | - protected function addViewerJS() |
|
| 72 | - { |
|
| 70 | + protected function addViewerJS() { |
|
| 73 | 71 | $markerArray = ''; |
| 74 | 72 | // CSS files. |
| 75 | 73 | $cssFiles = [ |
@@ -139,8 +137,7 @@ discard block |
||
| 139 | 137 | * |
| 140 | 138 | * @return array Marker array |
| 141 | 139 | */ |
| 142 | - protected function addInteraction() |
|
| 143 | - { |
|
| 140 | + protected function addInteraction() { |
|
| 144 | 141 | $markerArray = []; |
| 145 | 142 | if ($this->piVars['id']) { |
| 146 | 143 | if ($this->conf['crop']) { |
@@ -166,8 +163,7 @@ discard block |
||
| 166 | 163 | * |
| 167 | 164 | * @return array Marker array |
| 168 | 165 | */ |
| 169 | - protected function addBasketForm() |
|
| 170 | - { |
|
| 166 | + protected function addBasketForm() { |
|
| 171 | 167 | $markerArray = []; |
| 172 | 168 | // Add basket button |
| 173 | 169 | if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
@@ -215,8 +211,7 @@ discard block |
||
| 215 | 211 | * |
| 216 | 212 | * @return array URL and MIME type of image file |
| 217 | 213 | */ |
| 218 | - protected function getImage($page) |
|
| 219 | - { |
|
| 214 | + protected function getImage($page) { |
|
| 220 | 215 | $image = []; |
| 221 | 216 | // Get @USE value of METS fileGrp. |
| 222 | 217 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrps']); |
@@ -252,8 +247,7 @@ discard block |
||
| 252 | 247 | * |
| 253 | 248 | * @return array URL and MIME type of fulltext file |
| 254 | 249 | */ |
| 255 | - protected function getFulltext($page) |
|
| 256 | - { |
|
| 250 | + protected function getFulltext($page) { |
|
| 257 | 251 | $fulltext = []; |
| 258 | 252 | // Get fulltext link. |
| 259 | 253 | if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']])) { |
@@ -284,8 +278,7 @@ discard block |
||
| 284 | 278 | * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as |
| 285 | 279 | * some information about the canvas. |
| 286 | 280 | */ |
| 287 | - protected function getAnnotationContainers($page) |
|
| 288 | - { |
|
| 281 | + protected function getAnnotationContainers($page) { |
|
| 289 | 282 | if ($this->doc instanceof IiifManifest) { |
| 290 | 283 | $canvasId = $this->doc->physicalStructure[$page]; |
| 291 | 284 | $iiif = $this->doc->getIiif(); |
@@ -342,8 +335,7 @@ discard block |
||
| 342 | 335 | * |
| 343 | 336 | * @return string The content that is displayed on the website |
| 344 | 337 | */ |
| 345 | - public function main($content, $conf) |
|
| 346 | - { |
|
| 338 | + public function main($content, $conf) { |
|
| 347 | 339 | $this->init($conf); |
| 348 | 340 | // Load current document. |
| 349 | 341 | $this->loadDocument(); |