@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var array |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $audio = array (); |
|
| 30 | + protected $audio = array(); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Adds Player javascript |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | protected function addPlayerJS() { |
| 40 | 40 | |
| 41 | - $output = array (); |
|
| 41 | + $output = array(); |
|
| 42 | 42 | |
| 43 | 43 | $output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/blue.monday/css/jplayer.blue.monday.min.css">'; |
| 44 | 44 | |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | $(document).ready(function() { |
| 56 | 56 | tx_dlf_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 | 63 | swfPath: "'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/jPlayer/jquery.jplayer.swf" |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // Fill in the template markers. |
| 141 | - $markerArray = array ( |
|
| 141 | + $markerArray = array( |
|
| 142 | 142 | '###PLAYER_JS###' => $this->addPlayerJS() |
| 143 | 143 | ); |
| 144 | 144 | |
@@ -101,130 +101,130 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * Adds pageview interaction (crop, magnifier and rotation) |
|
| 105 | - * |
|
| 106 | - * @access protected |
|
| 107 | - * |
|
| 108 | - * @return array Marker array |
|
| 109 | - */ |
|
| 110 | - protected function addInteraction() { |
|
| 104 | + * Adds pageview interaction (crop, magnifier and rotation) |
|
| 105 | + * |
|
| 106 | + * @access protected |
|
| 107 | + * |
|
| 108 | + * @return array Marker array |
|
| 109 | + */ |
|
| 110 | + protected function addInteraction() { |
|
| 111 | 111 | |
| 112 | - $markerArray = array(); |
|
| 112 | + $markerArray = array(); |
|
| 113 | 113 | |
| 114 | - if ($this->piVars['id']) { |
|
| 114 | + if ($this->piVars['id']) { |
|
| 115 | 115 | |
| 116 | - if (empty($this->piVars['page'])) { |
|
| 116 | + if (empty($this->piVars['page'])) { |
|
| 117 | 117 | |
| 118 | - $params['page'] = 1; |
|
| 118 | + $params['page'] = 1; |
|
| 119 | 119 | |
| 120 | - } |
|
| 120 | + } |
|
| 121 | 121 | |
| 122 | - if ($this->conf['crop']) { |
|
| 122 | + if ($this->conf['crop']) { |
|
| 123 | 123 | |
| 124 | - $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>'; |
|
| 124 | + $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();">'.$this->pi_getLL('editMode', '', TRUE).'</a>'; |
|
| 125 | 125 | |
| 126 | - $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>'; |
|
| 126 | + $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();">'.$this->pi_getLL('editRemove', '', TRUE).'</a>'; |
|
| 127 | 127 | |
| 128 | - } else { |
|
| 128 | + } else { |
|
| 129 | 129 | |
| 130 | - $markerArray['###EDITBUTTON###'] = ''; |
|
| 130 | + $markerArray['###EDITBUTTON###'] = ''; |
|
| 131 | 131 | |
| 132 | - $markerArray['###EDITREMOVE###'] = ''; |
|
| 132 | + $markerArray['###EDITREMOVE###'] = ''; |
|
| 133 | 133 | |
| 134 | - } |
|
| 134 | + } |
|
| 135 | 135 | |
| 136 | - if ($this->conf['magnifier']) { |
|
| 136 | + if ($this->conf['magnifier']) { |
|
| 137 | 137 | |
| 138 | - $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>'; |
|
| 138 | + $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();">'.$this->pi_getLL('magnifier', '', TRUE).'</a>'; |
|
| 139 | 139 | |
| 140 | - } else { |
|
| 140 | + } else { |
|
| 141 | 141 | |
| 142 | - $markerArray['###MAGNIFIER###'] = ''; |
|
| 142 | + $markerArray['###MAGNIFIER###'] = ''; |
|
| 143 | 143 | |
| 144 | - } |
|
| 144 | + } |
|
| 145 | 145 | |
| 146 | - } |
|
| 146 | + } |
|
| 147 | 147 | |
| 148 | - return $markerArray; |
|
| 149 | - } |
|
| 148 | + return $markerArray; |
|
| 149 | + } |
|
| 150 | 150 | |
| 151 | - /** |
|
| 152 | - * Adds form to save cropping data to basket |
|
| 153 | - * |
|
| 154 | - * @access protected |
|
| 155 | - * |
|
| 156 | - * @return array Marker array |
|
| 157 | - */ |
|
| 158 | - protected function addBasketForm() { |
|
| 151 | + /** |
|
| 152 | + * Adds form to save cropping data to basket |
|
| 153 | + * |
|
| 154 | + * @access protected |
|
| 155 | + * |
|
| 156 | + * @return array Marker array |
|
| 157 | + */ |
|
| 158 | + protected function addBasketForm() { |
|
| 159 | 159 | |
| 160 | - $markerArray = array(); |
|
| 160 | + $markerArray = array(); |
|
| 161 | 161 | |
| 162 | - // Add basket button |
|
| 163 | - if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
|
| 162 | + // Add basket button |
|
| 163 | + if ($this->conf['basketButton'] && $this->conf['targetBasket'] && $this->piVars['id']) { |
|
| 164 | 164 | |
| 165 | - $label = $this->pi_getLL('addBasket', '', TRUE); |
|
| 165 | + $label = $this->pi_getLL('addBasket', '', TRUE); |
|
| 166 | 166 | |
| 167 | - $params = array( |
|
| 168 | - 'id' => $this->piVars['id'], |
|
| 169 | - 'addToBasket' => true |
|
| 170 | - ); |
|
| 167 | + $params = array( |
|
| 168 | + 'id' => $this->piVars['id'], |
|
| 169 | + 'addToBasket' => true |
|
| 170 | + ); |
|
| 171 | 171 | |
| 172 | - if (empty($this->piVars['page'])) { |
|
| 172 | + if (empty($this->piVars['page'])) { |
|
| 173 | 173 | |
| 174 | - $params['page'] = 1; |
|
| 174 | + $params['page'] = 1; |
|
| 175 | 175 | |
| 176 | - } |
|
| 176 | + } |
|
| 177 | 177 | |
| 178 | - $basketConf = array ( |
|
| 179 | - 'parameter' => $this->conf['targetBasket'], |
|
| 180 | - 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
|
| 181 | - 'title' => $label |
|
| 182 | - ); |
|
| 178 | + $basketConf = array ( |
|
| 179 | + 'parameter' => $this->conf['targetBasket'], |
|
| 180 | + 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
|
| 181 | + 'title' => $label |
|
| 182 | + ); |
|
| 183 | 183 | |
| 184 | - $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
| 184 | + $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">'; |
|
| 185 | 185 | |
| 186 | - $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">'; |
|
| 186 | + $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.$this->piVars['page'].'">'; |
|
| 187 | 187 | |
| 188 | - $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">'; |
|
| 188 | + $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.$this->piVars['page'].'">'; |
|
| 189 | 189 | |
| 190 | - $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
|
| 190 | + $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">'; |
|
| 191 | 191 | |
| 192 | - $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">'; |
|
| 192 | + $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">'; |
|
| 193 | 193 | |
| 194 | - $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">'; |
|
| 194 | + $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">'; |
|
| 195 | 195 | |
| 196 | - $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">'; |
|
| 196 | + $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">'; |
|
| 197 | 197 | |
| 198 | - $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
|
| 198 | + $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">'; |
|
| 199 | 199 | |
| 200 | - $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
| 200 | + $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>'; |
|
| 201 | 201 | |
| 202 | - $output .= '</form>'; |
|
| 202 | + $output .= '</form>'; |
|
| 203 | 203 | |
| 204 | - $output .= '<script>'; |
|
| 204 | + $output .= '<script>'; |
|
| 205 | 205 | |
| 206 | - $output .= ' |
|
| 206 | + $output .= ' |
|
| 207 | 207 | $(document).ready(function() { |
| 208 | 208 | $("#submitBasketForm").click(function() { |
| 209 | 209 | $("#addToBasketForm").submit(); |
| 210 | 210 | }); |
| 211 | 211 | });'; |
| 212 | 212 | |
| 213 | - $output .= '</script>'; |
|
| 213 | + $output .= '</script>'; |
|
| 214 | 214 | |
| 215 | - $markerArray['###BASKETBUTTON###'] = $output; |
|
| 215 | + $markerArray['###BASKETBUTTON###'] = $output; |
|
| 216 | 216 | |
| 217 | - } else { |
|
| 217 | + } else { |
|
| 218 | 218 | |
| 219 | - $markerArray['###BASKETBUTTON###'] = ''; |
|
| 219 | + $markerArray['###BASKETBUTTON###'] = ''; |
|
| 220 | 220 | |
| 221 | - } |
|
| 221 | + } |
|
| 222 | 222 | |
| 223 | - return $markerArray; |
|
| 224 | - } |
|
| 223 | + return $markerArray; |
|
| 224 | + } |
|
| 225 | 225 | |
| 226 | - /** |
|
| 227 | - * Get image's URL and MIME type |
|
| 226 | + /** |
|
| 227 | + * Get image's URL and MIME type |
|
| 228 | 228 | * |
| 229 | 229 | * @access protected |
| 230 | 230 | * |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | |
| 391 | 391 | $markerArray = array_merge($markerArray, $this->addInteraction(), $this->addBasketForm()); |
| 392 | 392 | |
| 393 | - $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
| 393 | + $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
|
| 394 | 394 | |
| 395 | 395 | return $this->pi_wrapInBaseClass($content); |
| 396 | 396 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var array |
| 28 | 28 | * @access protected |
| 29 | 29 | */ |
| 30 | - protected $controls = array (); |
|
| 30 | + protected $controls = array(); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Holds the current images' URLs and MIME types |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @var array |
| 36 | 36 | * @access protected |
| 37 | 37 | */ |
| 38 | - protected $images = array (); |
|
| 38 | + protected $images = array(); |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Holds the current fulltexts' URLs |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @var array |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $fulltexts = array (); |
|
| 46 | + protected $fulltexts = array(); |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Adds Viewer javascript |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | protected function addViewerJS() { |
| 56 | 56 | |
| 57 | - $output = array (); |
|
| 57 | + $output = array(); |
|
| 58 | 58 | |
| 59 | 59 | // Add OpenLayers library. |
| 60 | 60 | $output[] = '<link type="text/css" rel="stylesheet" href="'.\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'lib/OpenLayers/ol3.css">'; |
@@ -86,11 +86,11 @@ discard block |
||
| 86 | 86 | window.onload = function() { |
| 87 | 87 | if (dlfUtils.exists(dlfViewer)) { |
| 88 | 88 | tx_dlf_viewer = new dlfViewer({ |
| 89 | - controls: ["' . implode('", "', $this->controls) . '"], |
|
| 90 | - div: "' . $this->conf['elementId'] . '", |
|
| 91 | - images: ' . json_encode($this->images) . ', |
|
| 92 | - fulltexts: '. json_encode($this->fulltexts) . ', |
|
| 93 | - useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0) .' |
|
| 89 | + controls: ["' . implode('", "', $this->controls).'"], |
|
| 90 | + div: "' . $this->conf['elementId'].'", |
|
| 91 | + images: ' . json_encode($this->images).', |
|
| 92 | + fulltexts: '. json_encode($this->fulltexts).', |
|
| 93 | + useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0).' |
|
| 94 | 94 | }) |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - $basketConf = array ( |
|
| 178 | + $basketConf = array( |
|
| 179 | 179 | 'parameter' => $this->conf['targetBasket'], |
| 180 | 180 | 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', TRUE, FALSE), |
| 181 | 181 | 'title' => $label |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | protected function getImage($page) { |
| 236 | 236 | |
| 237 | - $image = array (); |
|
| 237 | + $image = array(); |
|
| 238 | 238 | |
| 239 | 239 | // Get @USE value of METS fileGrp. |
| 240 | 240 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrps']); |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | if ($this->conf['useInternalProxy']) { |
| 250 | 250 | // Configure @action URL for form. |
| 251 | - $linkConf = array ( |
|
| 251 | + $linkConf = array( |
|
| 252 | 252 | 'parameter' => $GLOBALS['TSFE']->id, |
| 253 | 253 | 'additionalParams' => '&eID=tx_dlf_geturl_eid&url='.urlencode($image['url']), |
| 254 | 254 | ); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | */ |
| 288 | 288 | protected function getFulltext($page) { |
| 289 | 289 | |
| 290 | - $fulltext = array (); |
|
| 290 | + $fulltext = array(); |
|
| 291 | 291 | |
| 292 | 292 | // Get fulltext link. |
| 293 | 293 | if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']])) { |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | $fulltext['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$this->conf['fileGrpFulltext']]); |
| 296 | 296 | |
| 297 | 297 | // Configure @action URL for form. |
| 298 | - $linkConf = array ( |
|
| 298 | + $linkConf = array( |
|
| 299 | 299 | 'parameter' => $GLOBALS['TSFE']->id, |
| 300 | 300 | 'additionalParams' => '&eID=tx_dlf_geturl_eid&url='.urlencode($fulltext['url']), |
| 301 | 301 | ); |
@@ -344,9 +344,9 @@ discard block |
||
| 344 | 344 | |
| 345 | 345 | // Set default values if not set. |
| 346 | 346 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
| 347 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 347 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 348 | 348 | |
| 349 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 349 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 350 | 350 | |
| 351 | 351 | } else { |
| 352 | 352 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $this->controls = explode(',', $this->conf['features']); |
| 385 | 385 | |
| 386 | 386 | // Fill in the template markers. |
| 387 | - $markerArray = array ( |
|
| 387 | + $markerArray = array( |
|
| 388 | 388 | '###VIEWER_JS###' => $this->addViewerJS() |
| 389 | 389 | ); |
| 390 | 390 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $this->scriptRelPath = 'plugins/pageview/class.tx_dlf_geturl_eid.php'; |
| 48 | 48 | |
| 49 | 49 | $url = GeneralUtility::_GP('url'); |
| 50 | - $includeHeader = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(GeneralUtility::_GP('header'), 0, 2, 0); |
|
| 50 | + $includeHeader = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(GeneralUtility::_GP('header'), 0, 2, 0); |
|
| 51 | 51 | |
| 52 | 52 | // first we fetch header separately |
| 53 | 53 | $fetchedHeader = GeneralUtility::getUrl($url, 2); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return void |
| 40 | 40 | */ |
| 41 | - public function main($content = '', $conf = array ()) { |
|
| 41 | + public function main($content = '', $conf = array()) { |
|
| 42 | 42 | |
| 43 | 43 | $this->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); |
| 44 | 44 | |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // add some self calculated header tags |
| 66 | - header('Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . 'GMT'); |
|
| 66 | + header('Last-Modified: '.gmdate("D, d M Y H:i:s").'GMT'); |
|
| 67 | 67 | header('Cache-Control: max-age=3600, must-revalidate'); |
| 68 | 68 | header('Content-Length: '.strlen($fetchedData)); |
| 69 | 69 | $fi = finfo_open(FILEINFO_MIME); |
| 70 | - header('Content-Type: ' . finfo_buffer($fi, $fetchedData)); |
|
| 70 | + header('Content-Type: '.finfo_buffer($fi, $fetchedData)); |
|
| 71 | 71 | |
| 72 | 72 | // take some tags from request header and overwrite in case already set |
| 73 | 73 | $fetchedHeader = explode("\n", GeneralUtility::getUrl($url, 2)); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | // Set default values if not set. |
| 53 | 53 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
| 54 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 54 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 55 | 55 | |
| 56 | 56 | $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
| 57 | 57 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | .$this->pi_getLL('fulltext-on', '', TRUE).';fulltext-off:' |
| 85 | 85 | .$this->pi_getLL('fulltext-off', '', TRUE).'"> </a>'; |
| 86 | 86 | } else { |
| 87 | - $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . $this->pi_getLL('fulltext-not-available', '', TRUE) . '</span>'; |
|
| 87 | + $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">'.$this->pi_getLL('fulltext-not-available', '', TRUE).'</span>'; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray); |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | // Set default values if not set. |
| 53 | 53 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
| 54 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 54 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 55 | 55 | |
| 56 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 56 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 57 | 57 | |
| 58 | 58 | } else { |
| 59 | 59 | |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | if (TYPO3_DLOG && empty($page1Link) && empty($page2Link)) { |
| 121 | - \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] ' . |
|
| 122 | - 'File not found in fileGrp "' . |
|
| 123 | - $this->conf['fileGrpDownload'] . '"', |
|
| 121 | + \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_toolsPdf->getPageLink()] '. |
|
| 122 | + 'File not found in fileGrp "'. |
|
| 123 | + $this->conf['fileGrpDownload'].'"', |
|
| 124 | 124 | $this->extKey, |
| 125 | 125 | SYSLOG_SEVERITY_WARNING); |
| 126 | 126 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | array('parameter' => $page2Link, 'title' => $this->pi_getLL('rightPage', ''))); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - return $page1Link . $page2Link; |
|
| 143 | + return $page1Link.$page2Link; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | // Wrap URLs with HTML. |
| 175 | 175 | if (!empty($workLink)) { |
| 176 | 176 | |
| 177 | - $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), array ('parameter' => $workLink, 'title' => $this->pi_getLL('work', ''))); |
|
| 177 | + $workLink = $this->cObj->typoLink($this->pi_getLL('work', ''), array('parameter' => $workLink, 'title' => $this->pi_getLL('work', ''))); |
|
| 178 | 178 | |
| 179 | 179 | } else { |
| 180 | 180 | |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | // Set default values if not set. |
| 52 | 52 | // $this->piVars['page'] may be integer or string (physical structure @ID) |
| 53 | - if ( (int)$this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 53 | + if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) { |
|
| 54 | 54 | |
| 55 | - $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int)$this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 55 | + $this->piVars['page'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1); |
|
| 56 | 56 | |
| 57 | 57 | } else { |
| 58 | 58 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | // Get left or single page download. |
| 79 | - $markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', '')); |
|
| 79 | + $markerArray['###IMAGE_LEFT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'], $this->pi_getLL('leftPage', '')) : $this->getImage($this->piVars['page'], $this->pi_getLL('singlePage', '')); |
|
| 80 | 80 | |
| 81 | 81 | // Get right page download. |
| 82 | 82 | $markerArray['###IMAGE_RIGHT###'] = $this->piVars['double'] == 1 ? $this->getImage($this->piVars['page'] + 1, $this->pi_getLL('rightPage', '')) : ''; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | protected function getImage($page, $label) { |
| 102 | 102 | |
| 103 | - $image = array (); |
|
| 103 | + $image = array(); |
|
| 104 | 104 | |
| 105 | 105 | // Get @USE value of METS fileGrp. |
| 106 | 106 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']); |
@@ -121,13 +121,13 @@ discard block |
||
| 121 | 121 | break; |
| 122 | 122 | default: $mimetypeLabel = ''; |
| 123 | 123 | } |
| 124 | - $linkConf = array ( |
|
| 124 | + $linkConf = array( |
|
| 125 | 125 | 'parameter' => $image['url'], |
| 126 | - 'title' => $label . ' ' . $mimetypeLabel, |
|
| 126 | + 'title' => $label.' '.$mimetypeLabel, |
|
| 127 | 127 | 'additionalParams' => '', |
| 128 | 128 | ); |
| 129 | 129 | |
| 130 | - $imageLink = $this->cObj->typoLink($label . ' ' . $mimetypeLabel, $linkConf); |
|
| 130 | + $imageLink = $this->cObj->typoLink($label.' '.$mimetypeLabel, $linkConf); |
|
| 131 | 131 | |
| 132 | 132 | break; |
| 133 | 133 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // Build data array. |
| 57 | - $data = array ( |
|
| 57 | + $data = array( |
|
| 58 | 58 | 'conf' => $this->conf, |
| 59 | 59 | 'piVars' => $this->piVars, |
| 60 | 60 | ); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $cObj->data = $data; |
| 75 | 75 | |
| 76 | - $content .= $this->cObj->substituteMarkerArray($subpart, array ('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
| 76 | + $content .= $this->cObj->substituteMarkerArray($subpart, array('###TOOL###' => $cObj->cObjGetSingle($GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool], $GLOBALS['TSFE']->tmpl->setup['plugin.'][$tool.'.']))); |
|
| 77 | 77 | |
| 78 | 78 | } |
| 79 | 79 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * |
| 33 | 33 | * @return void |
| 34 | 34 | */ |
| 35 | - public function main($content = '', $conf = array ()) { |
|
| 35 | + public function main($content = '', $conf = array()) { |
|
| 36 | 36 | |
| 37 | 37 | if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('encrypted') != '' && \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('hashed') != '') { |
| 38 | 38 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | // Get operator options. |
| 199 | 199 | $operatorOptions = ''; |
| 200 | 200 | |
| 201 | - foreach (array ('AND', 'OR', 'NOT') as $operator) { |
|
| 201 | + foreach (array('AND', 'OR', 'NOT') as $operator) { |
|
| 202 | 202 | |
| 203 | 203 | $operatorOptions .= '<option class="tx-dlf-search-operator-option tx-dlf-search-operator-'.$operator.'" value="'.$operator.'">'.$this->pi_getLL($operator, '', TRUE).'</option>'; |
| 204 | 204 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | |
| 218 | 218 | for ($i = 0; $i < $this->conf['extendedSlotCount']; $i++) { |
| 219 | 219 | |
| 220 | - $markerArray = array ( |
|
| 220 | + $markerArray = array( |
|
| 221 | 221 | '###EXT_SEARCH_OPERATOR###' => '<select class="tx-dlf-search-operator tx-dlf-search-operator-'.$i.'" name="'.$this->prefixId.'[extOperator]['.$i.']">'.$operatorOptions.'</select>', |
| 222 | 222 | '###EXT_SEARCH_FIELDSELECTOR###' => '<select class="tx-dlf-search-field tx-dlf-search-field-'.$i.'" name="'.$this->prefixId.'[extField]['.$i.']">'.$fieldSelectorOptions.'</select>', |
| 223 | 223 | '###EXT_SEARCH_FIELDQUERY###' => '<input class="tx-dlf-search-query tx-dlf-search-query-'.$i.'" type="text" name="'.$this->prefixId.'[extQuery]['.$i.']" />' |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | // Get facets from plugin configuration. |
| 264 | - $facets = array (); |
|
| 264 | + $facets = array(); |
|
| 265 | 265 | |
| 266 | 266 | foreach (\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['facets'], TRUE) as $facet) { |
| 267 | 267 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | // Render facets menu. |
| 273 | - $TSconfig = array (); |
|
| 273 | + $TSconfig = array(); |
|
| 274 | 274 | |
| 275 | 275 | $TSconfig['special'] = 'userfunction'; |
| 276 | 276 | |
@@ -302,13 +302,13 @@ discard block |
||
| 302 | 302 | // Check for plugin configuration. |
| 303 | 303 | if (!empty($this->conf['fulltext'])) { |
| 304 | 304 | |
| 305 | - $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="' . $this->prefixId . '[fulltext]" value="0" ' . ($isFulltextSearch == 0 ? 'checked="checked"' : '') .' />'; |
|
| 305 | + $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-no" type="radio" name="'.$this->prefixId.'[fulltext]" value="0" '.($isFulltextSearch == 0 ? 'checked="checked"' : '').' />'; |
|
| 306 | 306 | |
| 307 | - $output .= ' <label for="tx-dlf-search-fulltext-no">' . $this->pi_getLL('label.inMetadata', '') . '</label>'; |
|
| 307 | + $output .= ' <label for="tx-dlf-search-fulltext-no">'.$this->pi_getLL('label.inMetadata', '').'</label>'; |
|
| 308 | 308 | |
| 309 | - $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="' . $this->prefixId . '[fulltext]" value="1" ' . ($isFulltextSearch == 1 ? 'checked="checked"' : '') .'/>'; |
|
| 309 | + $output .= ' <input class="tx-dlf-search-fulltext" id="tx-dlf-search-fulltext-yes" type="radio" name="'.$this->prefixId.'[fulltext]" value="1" '.($isFulltextSearch == 1 ? 'checked="checked"' : '').'/>'; |
|
| 310 | 310 | |
| 311 | - $output .= ' <label for="tx-dlf-search-fulltext-yes">' . $this->pi_getLL('label.inFulltext', '') . '</label>'; |
|
| 311 | + $output .= ' <label for="tx-dlf-search-fulltext-yes">'.$this->pi_getLL('label.inFulltext', '').'</label>'; |
|
| 312 | 312 | |
| 313 | 313 | } |
| 314 | 314 | |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | //remove ($count) for selected facet in template |
| 382 | 382 | $entryArray['count'] = FALSE; |
| 383 | 383 | //build link to delete selected facet |
| 384 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 384 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 385 | 385 | $entryArray['title'] = sprintf($this->pi_getLL('resetFacet', ''), $entryArray['title']); |
| 386 | 386 | } |
| 387 | 387 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | - $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array ('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 397 | + $entryArray['_OVERRIDE_HREF'] = $this->pi_linkTP_keepPIvars_url(array('query' => $search['query'], 'fq' => $search['params']['fq'])); |
|
| 398 | 398 | |
| 399 | 399 | return $entryArray; |
| 400 | 400 | |
@@ -466,13 +466,13 @@ discard block |
||
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | // Configure @action URL for form. |
| 469 | - $linkConf = array ( |
|
| 469 | + $linkConf = array( |
|
| 470 | 470 | 'parameter' => $GLOBALS['TSFE']->id, |
| 471 | 471 | 'forceAbsoluteUrl' => 1 |
| 472 | 472 | ); |
| 473 | 473 | |
| 474 | 474 | // Fill markers. |
| 475 | - $markerArray = array ( |
|
| 475 | + $markerArray = array( |
|
| 476 | 476 | '###ACTION_URL###' => $this->cObj->typoLink_URL($linkConf), |
| 477 | 477 | '###LABEL_QUERY###' => (!empty($search['query']) ? $search['query'] : $this->pi_getLL('label.query')), |
| 478 | 478 | '###LABEL_SUBMIT###' => $this->pi_getLL('label.submit'), |
@@ -520,15 +520,15 @@ discard block |
||
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | // Prepare query parameters. |
| 523 | - $params = array (); |
|
| 523 | + $params = array(); |
|
| 524 | 524 | |
| 525 | - $matches = array (); |
|
| 525 | + $matches = array(); |
|
| 526 | 526 | |
| 527 | 527 | // Set search query. |
| 528 | 528 | if ((!empty($this->conf['fulltext']) && !empty($this->piVars['fulltext'])) || preg_match('/fulltext:\((.*)\)/', $this->piVars['query'], $matches)) { |
| 529 | 529 | |
| 530 | 530 | // If the query already is a fulltext query e.g using the facets |
| 531 | - $this->piVars['query'] = empty($matches[1])?$this->piVars['query']:$matches[1]; |
|
| 531 | + $this->piVars['query'] = empty($matches[1]) ? $this->piVars['query'] : $matches[1]; |
|
| 532 | 532 | |
| 533 | 533 | // Search in fulltext field if applicable. query must not be empty! |
| 534 | 534 | if (!empty($this->piVars['query'])) { |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | |
| 618 | 618 | $collIds = explode(',', $this->conf['collections']); |
| 619 | 619 | |
| 620 | - $collIndexNames = array (); |
|
| 620 | + $collIndexNames = array(); |
|
| 621 | 621 | |
| 622 | 622 | foreach ($collIds as $collId) { |
| 623 | 623 | |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | // Perform search. |
| 641 | 641 | $results = $solr->search($query); |
| 642 | 642 | |
| 643 | - $results->metadata = array ( |
|
| 643 | + $results->metadata = array( |
|
| 644 | 644 | 'label' => $label, |
| 645 | 645 | 'description' => '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $solr->numberOfHits, count($results))).'</p>', |
| 646 | 646 | 'thumbnail' => '', |
@@ -655,15 +655,15 @@ discard block |
||
| 655 | 655 | \TYPO3\CMS\Core\Utility\GeneralUtility::cleanOutputBuffers(); |
| 656 | 656 | |
| 657 | 657 | // Jump directly to the page view, if there is only one result and it is configured |
| 658 | - if($results->count() == 1 && !empty($this->conf['showSingleResult'])) { |
|
| 658 | + if ($results->count() == 1 && !empty($this->conf['showSingleResult'])) { |
|
| 659 | 659 | |
| 660 | 660 | $linkConf['parameter'] = $this->conf['targetPidPageView']; |
| 661 | 661 | |
| 662 | 662 | $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, |
| 663 | - array ( |
|
| 663 | + array( |
|
| 664 | 664 | 'id' => $results->current()['uid'], |
| 665 | 665 | 'highlight_word' => preg_replace('/\s\s+/', ';', $results->metadata['searchString']), |
| 666 | - 'page' => count($results[0]['subparts']) == 1?$results[0]['subparts'][0]['page']:1 |
|
| 666 | + 'page' => count($results[0]['subparts']) == 1 ? $results[0]['subparts'][0]['page'] : 1 |
|
| 667 | 667 | ), '', TRUE, FALSE); |
| 668 | 668 | |
| 669 | 669 | } else { |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | if (!empty($this->piVars['order'])) { |
| 675 | 675 | |
| 676 | 676 | $linkConf['additionalParams'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, |
| 677 | - array ( |
|
| 677 | + array( |
|
| 678 | 678 | 'order' => $this->piVars['order'], |
| 679 | 679 | 'asc' => (!empty($this->piVars['asc']) ? '1' : '0') |
| 680 | 680 | ), '', TRUE, FALSE); |
@@ -709,12 +709,12 @@ discard block |
||
| 709 | 709 | |
| 710 | 710 | $this->init($conf); |
| 711 | 711 | |
| 712 | - $menuArray = array (); |
|
| 712 | + $menuArray = array(); |
|
| 713 | 713 | |
| 714 | 714 | // Set default value for facet search. |
| 715 | - $search = array ( |
|
| 715 | + $search = array( |
|
| 716 | 716 | 'query' => '*', |
| 717 | - 'params' => array () |
|
| 717 | + 'params' => array() |
|
| 718 | 718 | ); |
| 719 | 719 | |
| 720 | 720 | // Extract query and filter from last search. |
@@ -743,14 +743,14 @@ discard block |
||
| 743 | 743 | |
| 744 | 744 | } |
| 745 | 745 | |
| 746 | - return array (); |
|
| 746 | + return array(); |
|
| 747 | 747 | |
| 748 | 748 | } |
| 749 | 749 | |
| 750 | 750 | // Set needed parameters for facet search. |
| 751 | 751 | if (empty($search['params']['fq'])) { |
| 752 | 752 | |
| 753 | - $search['params']['fq'] = array (); |
|
| 753 | + $search['params']['fq'] = array(); |
|
| 754 | 754 | |
| 755 | 755 | } |
| 756 | 756 | |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | // Process results. |
| 768 | 768 | foreach ($results->facet_counts->facet_fields as $field => $values) { |
| 769 | 769 | |
| 770 | - $entryArray = array (); |
|
| 770 | + $entryArray = array(); |
|
| 771 | 771 | |
| 772 | 772 | $entryArray['title'] = htmlspecialchars($this->conf['facets'][$field]); |
| 773 | 773 | |