@@ -55,12 +55,12 @@ |
||
| 55 | 55 | $(document).ready(function() { |
| 56 | 56 | AudioPlayer = new dlfAudioPlayer({ |
| 57 | 57 | audio: { |
| 58 | - mimeType: "' . $this->audio['mimetype'] . '", |
|
| 59 | - title: "' . $this->audio['label'] . '", |
|
| 60 | - url: "' . $this->audio['url'] . '" |
|
| 58 | + mimeType: "' . $this->audio['mimetype'].'", |
|
| 59 | + title: "' . $this->audio['label'].'", |
|
| 60 | + url: "' . $this->audio['url'].'" |
|
| 61 | 61 | }, |
| 62 | 62 | parentElId: "tx-dlf-audio", |
| 63 | - swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 63 | + swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf" |
|
| 64 | 64 | }); |
| 65 | 65 | }); |
| 66 | 66 | '; |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 30 | -{ |
|
| 29 | +class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 31 | 30 | public $scriptRelPath = 'Classes/Plugin/AudioPlayer.php'; |
| 32 | 31 | |
| 33 | 32 | /** |
@@ -45,8 +44,7 @@ discard block |
||
| 45 | 44 | * |
| 46 | 45 | * @return void |
| 47 | 46 | */ |
| 48 | - protected function addPlayerJS() |
|
| 49 | - { |
|
| 47 | + protected function addPlayerJS() { |
|
| 50 | 48 | // Inline CSS. |
| 51 | 49 | $inlineCSS = '#tx-dlf-audio { width: 100px; height: 100px; }'; |
| 52 | 50 | |
@@ -80,8 +78,7 @@ discard block |
||
| 80 | 78 | * |
| 81 | 79 | * @return string The content that is displayed on the website |
| 82 | 80 | */ |
| 83 | - public function main($content, $conf) |
|
| 84 | - { |
|
| 81 | + public function main($content, $conf) { |
|
| 85 | 82 | $this->init($conf); |
| 86 | 83 | // Load current document. |
| 87 | 84 | $this->loadDocument(); |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | $(document).ready(function() { |
| 79 | 79 | if (dlfUtils.exists(dlfViewer)) { |
| 80 | 80 | tx_dlf_viewer = new dlfViewer({ |
| 81 | - controls: ["' . implode('", "', $this->controls) . '"], |
|
| 82 | - div: "' . $this->conf['elementId'] . '", |
|
| 83 | - images: ' . json_encode($this->images) . ', |
|
| 84 | - fulltexts: ' . json_encode($this->fulltexts) . ', |
|
| 85 | - annotationContainers: ' . json_encode($this->annotationContainers) . ', |
|
| 86 | - useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0) . ' |
|
| 81 | + controls: ["' . implode('", "', $this->controls).'"], |
|
| 82 | + div: "' . $this->conf['elementId'].'", |
|
| 83 | + images: ' . json_encode($this->images).', |
|
| 84 | + fulltexts: ' . json_encode($this->fulltexts).', |
|
| 85 | + annotationContainers: ' . json_encode($this->annotationContainers).', |
|
| 86 | + useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0).' |
|
| 87 | 87 | }); |
| 88 | 88 | } |
| 89 | 89 | }); |
@@ -105,14 +105,14 @@ discard block |
||
| 105 | 105 | $markerArray = []; |
| 106 | 106 | if ($this->piVars['id']) { |
| 107 | 107 | if ($this->conf['crop']) { |
| 108 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="' . htmlspecialchars($this->pi_getLL('editMode', '')) . '">' . htmlspecialchars($this->pi_getLL('editMode', '')) . '</a>'; |
|
| 109 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="' . htmlspecialchars($this->pi_getLL('editRemove', '')) . '">' . htmlspecialchars($this->pi_getLL('editRemove', '')) . '</a>'; |
|
| 108 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="'.htmlspecialchars($this->pi_getLL('editMode', '')).'">'.htmlspecialchars($this->pi_getLL('editMode', '')).'</a>'; |
|
| 109 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="'.htmlspecialchars($this->pi_getLL('editRemove', '')).'">'.htmlspecialchars($this->pi_getLL('editRemove', '')).'</a>'; |
|
| 110 | 110 | } else { |
| 111 | 111 | $markerArray['###EDITBUTTON###'] = ''; |
| 112 | 112 | $markerArray['###EDITREMOVE###'] = ''; |
| 113 | 113 | } |
| 114 | 114 | if ($this->conf['magnifier']) { |
| 115 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="' . htmlspecialchars($this->pi_getLL('magnifier', '')) . '">' . htmlspecialchars($this->pi_getLL('magnifier', '')) . '</a>'; |
|
| 115 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="'.htmlspecialchars($this->pi_getLL('magnifier', '')).'">'.htmlspecialchars($this->pi_getLL('magnifier', '')).'</a>'; |
|
| 116 | 116 | } else { |
| 117 | 117 | $markerArray['###MAGNIFIER###'] = ''; |
| 118 | 118 | } |
@@ -147,15 +147,15 @@ discard block |
||
| 147 | 147 | 'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', true, false), |
| 148 | 148 | 'title' => $label |
| 149 | 149 | ]; |
| 150 | - $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">'; |
|
| 151 | - $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . htmlspecialchars($this->piVars['page']) . '">'; |
|
| 152 | - $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . htmlspecialchars($this->piVars['page']) . '">'; |
|
| 150 | + $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
| 151 | + $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.htmlspecialchars($this->piVars['page']).'">'; |
|
| 152 | + $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.htmlspecialchars($this->piVars['page']).'">'; |
|
| 153 | 153 | $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
| 154 | 154 | $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">'; |
| 155 | 155 | $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">'; |
| 156 | 156 | $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">'; |
| 157 | 157 | $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
| 158 | - $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>'; |
|
| 158 | + $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
| 159 | 159 | $output .= '</form>'; |
| 160 | 160 | $output .= '<script>'; |
| 161 | 161 | $output .= '$(document).ready(function() { $("#submitBasketForm").click(function() { $("#addToBasketForm").submit(); }); });'; |
@@ -191,14 +191,14 @@ discard block |
||
| 191 | 191 | 'parameter' => $GLOBALS['TSFE']->id, |
| 192 | 192 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
| 193 | 193 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
| 194 | - 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($image['url']), |
|
| 194 | + 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($image['url']), |
|
| 195 | 195 | ]; |
| 196 | 196 | $image['url'] = $this->cObj->typoLink_URL($linkConf); |
| 197 | 197 | } |
| 198 | 198 | $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpImages]); |
| 199 | 199 | break; |
| 200 | 200 | } else { |
| 201 | - Helper::devLog('File not found in fileGrp "' . $fileGrpImages . '"', DEVLOG_SEVERITY_WARNING); |
|
| 201 | + Helper::devLog('File not found in fileGrp "'.$fileGrpImages.'"', DEVLOG_SEVERITY_WARNING); |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | return $image; |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | 'parameter' => $GLOBALS['TSFE']->id, |
| 228 | 228 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
| 229 | 229 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
| 230 | - 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($fulltext['url']), |
|
| 230 | + 'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($fulltext['url']), |
|
| 231 | 231 | ]; |
| 232 | 232 | $fulltext['url'] = $this->cObj->typoLink_URL($linkConf); |
| 233 | 233 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | if (empty($fulltext)) { |
| 239 | - Helper::devLog('File not found in fileGrp "' . $this->conf['fileGrpFulltext'] . '"', DEVLOG_SEVERITY_WARNING); |
|
| 239 | + Helper::devLog('File not found in fileGrp "'.$this->conf['fileGrpFulltext'].'"', DEVLOG_SEVERITY_WARNING); |
|
| 240 | 240 | } |
| 241 | 241 | return $fulltext; |
| 242 | 242 | } |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | * @subpackage dlf |
| 29 | 29 | * @access public |
| 30 | 30 | */ |
| 31 | -class PageView extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 32 | -{ |
|
| 31 | +class PageView extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 33 | 32 | public $scriptRelPath = 'Classes/Plugin/PageView.php'; |
| 34 | 33 | |
| 35 | 34 | /** |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | * |
| 72 | 71 | * @return void |
| 73 | 72 | */ |
| 74 | - protected function addViewerJS() |
|
| 75 | - { |
|
| 73 | + protected function addViewerJS() { |
|
| 76 | 74 | // Viewer configuration. |
| 77 | 75 | $viewerConfiguration = ' |
| 78 | 76 | $(document).ready(function() { |
@@ -100,8 +98,7 @@ discard block |
||
| 100 | 98 | * |
| 101 | 99 | * @return array Marker array |
| 102 | 100 | */ |
| 103 | - protected function addInteraction() |
|
| 104 | - { |
|
| 101 | + protected function addInteraction() { |
|
| 105 | 102 | $markerArray = []; |
| 106 | 103 | if ($this->piVars['id']) { |
| 107 | 104 | if ($this->conf['crop']) { |
@@ -127,8 +124,7 @@ discard block |
||
| 127 | 124 | * |
| 128 | 125 | * @return array Marker array |
| 129 | 126 | */ |
| 130 | - protected function addBasketForm() |
|
| 131 | - { |
|
| 127 | + protected function addBasketForm() { |
|
| 132 | 128 | $markerArray = []; |
| 133 | 129 | // Add basket button |
| 134 | 130 | if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
@@ -176,8 +172,7 @@ discard block |
||
| 176 | 172 | * |
| 177 | 173 | * @return array URL and MIME type of image file |
| 178 | 174 | */ |
| 179 | - protected function getImage($page) |
|
| 180 | - { |
|
| 175 | + protected function getImage($page) { |
|
| 181 | 176 | $image = []; |
| 182 | 177 | // Get @USE value of METS fileGrp. |
| 183 | 178 | $fileGrpsImages = GeneralUtility::trimExplode(',', $this->conf['fileGrpImages']); |
@@ -213,8 +208,7 @@ discard block |
||
| 213 | 208 | * |
| 214 | 209 | * @return array URL and MIME type of fulltext file |
| 215 | 210 | */ |
| 216 | - protected function getFulltext($page) |
|
| 217 | - { |
|
| 211 | + protected function getFulltext($page) { |
|
| 218 | 212 | $fulltext = []; |
| 219 | 213 | // Get fulltext link. |
| 220 | 214 | $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']); |
@@ -250,8 +244,7 @@ discard block |
||
| 250 | 244 | * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as |
| 251 | 245 | * some information about the canvas. |
| 252 | 246 | */ |
| 253 | - protected function getAnnotationContainers($page) |
|
| 254 | - { |
|
| 247 | + protected function getAnnotationContainers($page) { |
|
| 255 | 248 | if ($this->doc instanceof IiifManifest) { |
| 256 | 249 | $canvasId = $this->doc->physicalStructure[$page]; |
| 257 | 250 | $iiif = $this->doc->getIiif(); |
@@ -308,8 +301,7 @@ discard block |
||
| 308 | 301 | * |
| 309 | 302 | * @return string The content that is displayed on the website |
| 310 | 303 | */ |
| 311 | - public function main($content, $conf) |
|
| 312 | - { |
|
| 304 | + public function main($content, $conf) { |
|
| 313 | 305 | $this->init($conf); |
| 314 | 306 | // Load current document. |
| 315 | 307 | $this->loadDocument(); |