@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * @subpackage dlf |
| 27 | 27 | * @access public |
| 28 | 28 | */ |
| 29 | -class AnnotationTool extends AbstractPlugin |
|
| 30 | -{ |
|
| 29 | +class AnnotationTool extends AbstractPlugin { |
|
| 31 | 30 | /** |
| 32 | 31 | * @access public |
| 33 | 32 | * @var string |
@@ -44,8 +43,7 @@ discard block |
||
| 44 | 43 | * |
| 45 | 44 | * @return string The content that is displayed on the website |
| 46 | 45 | */ |
| 47 | - public function main($content, $conf) |
|
| 48 | - { |
|
| 46 | + public function main($content, $conf) { |
|
| 49 | 47 | $this->init($conf); |
| 50 | 48 | // Merge configuration with conf array of toolbox. |
| 51 | 49 | if (!empty($this->cObj->data['conf'])) { |
@@ -84,9 +84,9 @@ |
||
| 84 | 84 | $annotationContainers != null |
| 85 | 85 | && sizeof($annotationContainers) > 0 |
| 86 | 86 | ) { |
| 87 | - $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:' . htmlspecialchars($this->pi_getLL('annotations-on', '')) . ';annotations-off:' . htmlspecialchars($this->pi_getLL('annotations-off', '')) . '"> </a>'; |
|
| 87 | + $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:'.htmlspecialchars($this->pi_getLL('annotations-on', '')).';annotations-off:'.htmlspecialchars($this->pi_getLL('annotations-off', '')).'"> </a>'; |
|
| 88 | 88 | } else { |
| 89 | - $markerArray['###ANNOTATION_SELECT###'] = '<span class="no-annotations">' . htmlspecialchars($this->pi_getLL('annotations-not-available', '')) . '</span>'; |
|
| 89 | + $markerArray['###ANNOTATION_SELECT###'] = '<span class="no-annotations">'.htmlspecialchars($this->pi_getLL('annotations-not-available', '')).'</span>'; |
|
| 90 | 90 | } |
| 91 | 91 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
| 92 | 92 | return $this->pi_wrapInBaseClass($content); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // Load current document. |
| 55 | 55 | $this->loadDocument(); |
| 56 | 56 | if ( |
| 57 | - $this->doc === null |
|
| 57 | + $this->doc === NULL |
|
| 58 | 58 | || $this->doc->numPages < 1 |
| 59 | 59 | ) { |
| 60 | 60 | // Quit without doing anything if required variables are not set. |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $this->getTemplate(); |
| 82 | 82 | $annotationContainers = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['annotationContainers']; |
| 83 | 83 | if ( |
| 84 | - $annotationContainers != null |
|
| 84 | + $annotationContainers != NULL |
|
| 85 | 85 | && sizeof($annotationContainers) > 0 |
| 86 | 86 | ) { |
| 87 | 87 | $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:' . htmlspecialchars($this->pi_getLL('annotations-on', '')) . ';annotations-off:' . htmlspecialchars($this->pi_getLL('annotations-off', '')) . '"> </a>'; |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | * @subpackage dlf |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class ImageManipulationTool extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 26 | -{ |
|
| 25 | +class ImageManipulationTool extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 27 | 26 | public $scriptRelPath = 'Classes/Plugin/Tools/ImageManipulationTool.php'; |
| 28 | 27 | |
| 29 | 28 | /** |
@@ -36,8 +35,7 @@ discard block |
||
| 36 | 35 | * |
| 37 | 36 | * @return string The content that is displayed on the website |
| 38 | 37 | */ |
| 39 | - public function main($content, $conf) |
|
| 40 | - { |
|
| 38 | + public function main($content, $conf) { |
|
| 41 | 39 | $this->init($conf); |
| 42 | 40 | // Merge configuration with conf array of toolbox. |
| 43 | 41 | if (!empty($this->cObj->data['conf'])) { |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $parentContainer = !empty($this->conf['parentContainer']) ? $this->conf['parentContainer'] : '.tx-dlf-imagemanipulationtool'; |
| 48 | 48 | // Load template file. |
| 49 | 49 | $this->getTemplate(); |
| 50 | - $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:' . htmlspecialchars($this->pi_getLL('imagemanipulation-on', '')) . ';imagemanipulation-off:' . htmlspecialchars($this->pi_getLL('imagemanipulation-off', '')) . ';reset:' . htmlspecialchars($this->pi_getLL('reset', '')) . ';saturation:' . htmlspecialchars($this->pi_getLL('saturation', '')) . ';hue:' . htmlspecialchars($this->pi_getLL('hue', '')) . ';contrast:' . htmlspecialchars($this->pi_getLL('contrast', '')) . ';brightness:' . htmlspecialchars($this->pi_getLL('brightness', '')) . ';invert:' . htmlspecialchars($this->pi_getLL('invert', '')) . ';parentContainer:' . $parentContainer . '" title="' . htmlspecialchars($this->pi_getLL('no-support', '')) . '"></span>'; |
|
| 50 | + $markerArray['###IMAGEMANIPULATION_SELECT###'] = '<span class="tx-dlf-tools-imagetools" id="tx-dlf-tools-imagetools" data-dic="imagemanipulation-on:'.htmlspecialchars($this->pi_getLL('imagemanipulation-on', '')).';imagemanipulation-off:'.htmlspecialchars($this->pi_getLL('imagemanipulation-off', '')).';reset:'.htmlspecialchars($this->pi_getLL('reset', '')).';saturation:'.htmlspecialchars($this->pi_getLL('saturation', '')).';hue:'.htmlspecialchars($this->pi_getLL('hue', '')).';contrast:'.htmlspecialchars($this->pi_getLL('contrast', '')).';brightness:'.htmlspecialchars($this->pi_getLL('brightness', '')).';invert:'.htmlspecialchars($this->pi_getLL('invert', '')).';parentContainer:'.$parentContainer.'" title="'.htmlspecialchars($this->pi_getLL('no-support', '')).'"></span>'; |
|
| 51 | 51 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
| 52 | 52 | return $this->pi_wrapInBaseClass($content); |
| 53 | 53 | } |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | * @subpackage dlf |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class ImageDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 26 | -{ |
|
| 25 | +class ImageDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 27 | 26 | public $scriptRelPath = 'Classes/Plugin/Tools/ImageDownloadTool.php'; |
| 28 | 27 | |
| 29 | 28 | /** |
@@ -36,8 +35,7 @@ discard block |
||
| 36 | 35 | * |
| 37 | 36 | * @return string The content that is displayed on the website |
| 38 | 37 | */ |
| 39 | - public function main($content, $conf) |
|
| 40 | - { |
|
| 38 | + public function main($content, $conf) { |
|
| 41 | 39 | $this->init($conf); |
| 42 | 40 | // Merge configuration with conf array of toolbox. |
| 43 | 41 | if (!empty($this->cObj->data['conf'])) { |
@@ -90,8 +88,7 @@ discard block |
||
| 90 | 88 | * |
| 91 | 89 | * @return string Link to image file with given label |
| 92 | 90 | */ |
| 93 | - protected function getImage($page, $label) |
|
| 94 | - { |
|
| 91 | + protected function getImage($page, $label) { |
|
| 95 | 92 | $image = []; |
| 96 | 93 | // Get @USE value of METS fileGrp. |
| 97 | 94 | $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->conf['fileGrpsImageDownload']); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | // Load current document. |
| 47 | 47 | $this->loadDocument(); |
| 48 | 48 | if ( |
| 49 | - $this->doc === null |
|
| 49 | + $this->doc === NULL |
|
| 50 | 50 | || $this->doc->numPages < 1 |
| 51 | 51 | || empty($this->conf['fileGrpsImageDownload']) |
| 52 | 52 | ) { |
@@ -114,13 +114,13 @@ |
||
| 114 | 114 | 'parameter' => $image['url'], |
| 115 | 115 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
| 116 | 116 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
| 117 | - 'title' => $label . $mimetypeLabel, |
|
| 117 | + 'title' => $label.$mimetypeLabel, |
|
| 118 | 118 | 'additionalParams' => '', |
| 119 | 119 | ]; |
| 120 | - $imageLink = $this->cObj->typoLink($label . $mimetypeLabel, $linkConf); |
|
| 120 | + $imageLink = $this->cObj->typoLink($label.$mimetypeLabel, $linkConf); |
|
| 121 | 121 | break; |
| 122 | 122 | } else { |
| 123 | - Helper::devLog('File not found in fileGrp "' . $fileGrp . '"', DEVLOG_SEVERITY_WARNING); |
|
| 123 | + Helper::devLog('File not found in fileGrp "'.$fileGrp.'"', DEVLOG_SEVERITY_WARNING); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | return $imageLink; |
@@ -199,20 +199,20 @@ |
||
| 199 | 199 | ); |
| 200 | 200 | // Register tools for toolbox plugin. |
| 201 | 201 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = []; |
| 202 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool'; |
|
| 203 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool'; |
|
| 204 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool'; |
|
| 205 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool'; |
|
| 206 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool'; |
|
| 207 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool'; |
|
| 202 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool'; |
|
| 203 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool'; |
|
| 204 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool'; |
|
| 205 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool'; |
|
| 206 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool'; |
|
| 207 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool'; |
|
| 208 | 208 | // Register hooks. |
| 209 | 209 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 210 | 210 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 211 | 211 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class; |
| 212 | 212 | // Register AJAX eID handlers. |
| 213 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugin\Eid\SearchSuggest::class . '::main'; |
|
| 214 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Plugin\Eid\SearchInDocument::class . '::main'; |
|
| 215 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Plugin\Eid\PageViewProxy::class . '::main'; |
|
| 213 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugin\Eid\SearchSuggest::class.'::main'; |
|
| 214 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Plugin\Eid\SearchInDocument::class.'::main'; |
|
| 215 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Plugin\Eid\PageViewProxy::class.'::main'; |
|
| 216 | 216 | // Use Caching Framework for Solr queries |
| 217 | 217 | if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) { |
| 218 | 218 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] = []; |