@@ -67,7 +67,7 @@ |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $additionalGetVars = '&tx_dlf[id]=' . urlencode($previewMets) . '&no_cache=1'; |
| 70 | - $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('manager.tooltip.preview', 'dpf', $arguments = null); |
|
| 70 | + $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('manager.tooltip.preview', 'dpf', $arguments = NULL); |
|
| 71 | 71 | $icon = '<a href="#" data-toggle="tooltip" class="' . $class . '" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($pageUid, $this->backPath, '', '', '', $additionalGetVars)) . '" title="' . $title . '">' . |
| 72 | 72 | $insideText . '</a>'; |
| 73 | 73 | |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper; |
| 21 | 21 | use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; |
| 22 | 22 | |
| 23 | -class PreviewViewHelper extends AbstractBackendViewHelper |
|
| 24 | -{ |
|
| 23 | +class PreviewViewHelper extends AbstractBackendViewHelper { |
|
| 25 | 24 | |
| 26 | 25 | /** |
| 27 | 26 | * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * @param string $class |
| 67 | 66 | * @return string html output |
| 68 | 67 | */ |
| 69 | - protected function getViewIcon(array $row, $pageUid, $apiPid, $insideText, $class) |
|
| 70 | - { |
|
| 68 | + protected function getViewIcon(array $row, $pageUid, $apiPid, $insideText, $class) { |
|
| 71 | 69 | |
| 72 | 70 | $previewMets = BackendUtility::getViewDomain($pageUid) |
| 73 | 71 | . '/index.php?id=' . $apiPid |
@@ -97,8 +95,7 @@ discard block |
||
| 97 | 95 | * @param string $class |
| 98 | 96 | * @return string the rendered record list |
| 99 | 97 | */ |
| 100 | - public function render(array $arguments, $pageUid, $apiPid, $class) |
|
| 101 | - { |
|
| 98 | + public function render(array $arguments, $pageUid, $apiPid, $class) { |
|
| 102 | 99 | |
| 103 | 100 | if ($arguments['document']) { |
| 104 | 101 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | switch ($piVars['action']) { |
| 81 | 81 | case 'mets': |
| 82 | - $path = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes'; |
|
| 82 | + $path = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '/methods/qucosa:SDef/getMETSDissemination?supplement=yes'; |
|
| 83 | 83 | break; |
| 84 | 84 | |
| 85 | 85 | case 'preview': |
@@ -142,13 +142,13 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $qid = $piVars['qid']; |
| 144 | 144 | $source = explode(':', $qid); |
| 145 | - if($source[0] == 'qucosa') { |
|
| 145 | + if ($source[0] == 'qucosa') { |
|
| 146 | 146 | |
| 147 | - $path = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes'; |
|
| 147 | + $path = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '/methods/qucosa:SDef/getMETSDissemination?supplement=yes'; |
|
| 148 | 148 | $metsXml = str_replace('&', '&', file_get_contents($path)); |
| 149 | 149 | $dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml); |
| 150 | 150 | |
| 151 | - } elseif($document = $this->documentRepository->findByUid($piVars['qid'])) { |
|
| 151 | + } elseif ($document = $this->documentRepository->findByUid($piVars['qid'])) { |
|
| 152 | 152 | |
| 153 | 153 | $metsXml = str_replace('&', '&', $this->buildMetsXml($document)); |
| 154 | 154 | $dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml); |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | case 'zip': |
| 173 | 173 | // FIXME Service locations on Fedora host are hard coded |
| 174 | - $metsUrl = rtrim('http://' . $fedoraHost,"/") . '/mets?pid=' . $piVars['qid']; |
|
| 175 | - $path = rtrim('http://' . $fedoraHost,"/") . '/zip?metsurl=' . rawurlencode($metsUrl); |
|
| 174 | + $metsUrl = rtrim('http://' . $fedoraHost, "/") . '/mets?pid=' . $piVars['qid']; |
|
| 175 | + $path = rtrim('http://' . $fedoraHost, "/") . '/zip?metsurl=' . rawurlencode($metsUrl); |
|
| 176 | 176 | break; |
| 177 | 177 | |
| 178 | 178 | default: |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | if (TRUE === $restrictToActiveDocuments) { |
| 198 | 198 | // if restriction applies, check object state before dissemination |
| 199 | - $objectProfileURI = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'?format=XML'; |
|
| 199 | + $objectProfileURI = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '?format=XML'; |
|
| 200 | 200 | $objectProfileXML = file_get_contents($objectProfileURI); |
| 201 | 201 | if (FALSE !== $objectProfileXML) { |
| 202 | 202 | $objectProfileDOM = new \DOMDocument('1.0', 'UTF-8'); |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
| 18 | 18 | |
| 19 | -class FileUrlViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper |
|
| 20 | -{ |
|
| 19 | +class FileUrlViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper { |
|
| 21 | 20 | /** |
| 22 | 21 | * Secret API key for delivering inactive documents. |
| 23 | 22 | * @var string |
@@ -43,8 +42,7 @@ discard block |
||
| 43 | 42 | * @param string $uri |
| 44 | 43 | * |
| 45 | 44 | */ |
| 46 | - public function render($uri) |
|
| 47 | - { |
|
| 45 | + public function render($uri) { |
|
| 48 | 46 | $fileUri = $this->buildFileUri($uri); |
| 49 | 47 | |
| 50 | 48 | // pass configured API secret key parameter to enable dissemination for inactive documents |
@@ -58,8 +56,7 @@ discard block |
||
| 58 | 56 | /** |
| 59 | 57 | * Construct file URI |
| 60 | 58 | */ |
| 61 | - protected function buildFileUri($uri) |
|
| 62 | - { |
|
| 59 | + protected function buildFileUri($uri) { |
|
| 63 | 60 | |
| 64 | 61 | $uploadFileUrl = new \EWW\Dpf\Helper\UploadFileUrl; |
| 65 | 62 | |