@@ -90,7 +90,7 @@ |
||
| 90 | 90 | |
| 91 | 91 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( |
| 92 | 92 | array('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_coins', |
| 93 | - 'dpf_coins'), |
|
| 94 | - 'list_type', |
|
| 95 | - 'dpf'); |
|
| 93 | + 'dpf_coins'), |
|
| 94 | + 'list_type', |
|
| 95 | + 'dpf'); |
|
| 96 | 96 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dpf_coins', 'FILE:EXT:dpf/Classes/Plugins/Coins/flexform.xml'); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dpf_metatags'] = 'pi_flexform'; |
| 54 | 54 | |
| 55 | 55 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( |
| 56 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_metatags', |
|
| 56 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_metatags', |
|
| 57 | 57 | 'dpf_metatags'), |
| 58 | 58 | 'list_type', |
| 59 | 59 | 'dpf' |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dpf_downloadtool'] = 'pi_flexform'; |
| 66 | 66 | |
| 67 | 67 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( |
| 68 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_downloadtool', |
|
| 68 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_downloadtool', |
|
| 69 | 69 | 'dpf_downloadtool'), |
| 70 | 70 | 'list_type', |
| 71 | 71 | 'dpf' |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dpf_relatedlisttool'] = 'pi_flexform'; |
| 78 | 78 | |
| 79 | 79 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( |
| 80 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_relatedlisttool', |
|
| 80 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_relatedlisttool', |
|
| 81 | 81 | 'dpf_relatedlisttool'), |
| 82 | 82 | 'list_type', |
| 83 | 83 | 'dpf' |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dpf_coins'] = 'pi_flexform'; |
| 90 | 90 | |
| 91 | 91 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( |
| 92 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_coins', |
|
| 92 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:tt_content.dpf_coins', |
|
| 93 | 93 | 'dpf_coins'), |
| 94 | 94 | 'list_type', |
| 95 | 95 | 'dpf'); |
@@ -142,19 +142,19 @@ discard block |
||
| 142 | 142 | ); |
| 143 | 143 | |
| 144 | 144 | |
| 145 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/MetaTags/MetaTags.php', '_metatags', 'list_type', true); |
|
| 145 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/MetaTags/MetaTags.php', '_metatags', 'list_type', TRUE); |
|
| 146 | 146 | $overrideSetup = 'plugin.tx_dpf_metatags.userFunc = EWW\Dpf\Plugins\MetaTags\MetaTags->main'; |
| 147 | 147 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup); |
| 148 | 148 | |
| 149 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/DownloadTool/DownloadTool.php', '_downloadtool', 'list_type', true); |
|
| 149 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/DownloadTool/DownloadTool.php', '_downloadtool', 'list_type', TRUE); |
|
| 150 | 150 | $overrideSetup = 'plugin.tx_dpf_downloadtool.userFunc = EWW\Dpf\Plugins\DownloadTool\DownloadTool->main'; |
| 151 | 151 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup); |
| 152 | 152 | |
| 153 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/RelatedListTool/RelatedListTool.php', '_relatedlisttool', 'list_type', true); |
|
| 153 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/RelatedListTool/RelatedListTool.php', '_relatedlisttool', 'list_type', TRUE); |
|
| 154 | 154 | $overrideSetup = 'plugin.tx_dpf_relatedlisttool.userFunc = EWW\Dpf\Plugins\RelatedListTool\RelatedListTool->main'; |
| 155 | 155 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup); |
| 156 | 156 | |
| 157 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/Coins/Coins.php', '_coins', 'list_type', true); |
|
| 157 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'Classes/Plugins/Coins/Coins.php', '_coins', 'list_type', TRUE); |
|
| 158 | 158 | $overrideSetup = 'plugin.tx_dpf_coins.userFunc = EWW\Dpf\Plugins\Coins\Coins->main'; |
| 159 | 159 | \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', $overrideSetup); |
| 160 | 160 | |
@@ -175,28 +175,28 @@ discard block |
||
| 175 | 175 | 'actionChange', |
| 176 | 176 | \EWW\Dpf\Services\Document\DocumentCleaner::class, |
| 177 | 177 | 'cleanUpDocuments', |
| 178 | - false |
|
| 178 | + FALSE |
|
| 179 | 179 | ); |
| 180 | 180 | $signalSlotDispatcher->connect( |
| 181 | 181 | \EWW\Dpf\Controller\SearchController::class, |
| 182 | 182 | 'actionChange', |
| 183 | 183 | \EWW\Dpf\Services\Document\DocumentCleaner::class, |
| 184 | 184 | 'cleanUpDocuments', |
| 185 | - false |
|
| 185 | + FALSE |
|
| 186 | 186 | ); |
| 187 | 187 | $signalSlotDispatcher->connect( |
| 188 | 188 | \EWW\Dpf\Controller\DocumentFormBackofficeController::class, |
| 189 | 189 | 'actionChange', |
| 190 | 190 | \EWW\Dpf\Services\Document\DocumentCleaner::class, |
| 191 | 191 | 'cleanUpDocuments', |
| 192 | - false |
|
| 192 | + FALSE |
|
| 193 | 193 | ); |
| 194 | 194 | $signalSlotDispatcher->connect( |
| 195 | 195 | \EWW\Dpf\Controller\WorkspaceController::class, |
| 196 | 196 | 'actionChange', |
| 197 | 197 | \EWW\Dpf\Services\Document\DocumentCleaner::class, |
| 198 | 198 | 'cleanUpDocuments', |
| 199 | - false |
|
| 199 | + FALSE |
|
| 200 | 200 | ); |
| 201 | 201 | |
| 202 | 202 | // ElasticSearch |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | 'indexDocument', |
| 206 | 206 | \EWW\Dpf\Services\ElasticSearch\ElasticSearch::class, |
| 207 | 207 | 'index', |
| 208 | - false |
|
| 208 | + FALSE |
|
| 209 | 209 | ); |
| 210 | 210 | |
| 211 | 211 | $signalSlotDispatcher->connect( |
@@ -213,5 +213,5 @@ discard block |
||
| 213 | 213 | 'deleteDocumentFromIndex', |
| 214 | 214 | \EWW\Dpf\Services\ElasticSearch\ElasticSearch::class, |
| 215 | 215 | 'delete', |
| 216 | - false |
|
| 216 | + FALSE |
|
| 217 | 217 | ); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return string The coins <span> ready for output |
| 91 | 91 | */ |
| 92 | - protected function generateCoins(array $metadata) |
|
| 92 | + protected function generateCoins(array $metadata) |
|
| 93 | 93 | { |
| 94 | 94 | |
| 95 | 95 | // The output follows the "Brief guide to Implementing OpenURL 1.0 Context Object for Journal Articles" |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | * |
| 248 | 248 | * @return Formatted date |
| 249 | 249 | */ |
| 250 | - protected function safelyFormatDate($format, $date) |
|
| 250 | + protected function safelyFormatDate($format, $date) |
|
| 251 | 251 | { |
| 252 | 252 | return (strlen($date) == 4) ? $date : date($format, strtotime($date)); |
| 253 | 253 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - $metadata = array(); |
|
| 65 | + $metadata = array (); |
|
| 66 | 66 | $metadata = $this->doc->getTitleData($this->conf['pages']); |
| 67 | 67 | |
| 68 | 68 | $metadata['_id'] = $this->doc->toplevelId; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $coins .= '&ctx_ver=Z39.88-2004'; |
| 101 | 101 | |
| 102 | 102 | // TODO: Get the document type to differentiate info:ofi/fmt:kev:mtx:[book/journal] and rft.genre=[…] |
| 103 | - $coins .= '&rft_val_fmt='. urlencode('info:ofi/fmt:kev:mtx:journal'); |
|
| 103 | + $coins .= '&rft_val_fmt=' . urlencode('info:ofi/fmt:kev:mtx:journal'); |
|
| 104 | 104 | $coins .= '&rft.genre=unknown'; |
| 105 | 105 | |
| 106 | 106 | foreach ($metadata as $index_name => $values) { |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | * @subpackage tx_dpf |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class Coins extends \Kitodo\Dlf\Common\AbstractPlugin |
|
| 28 | -{ |
|
| 27 | +class Coins extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
| 29 | 28 | public $scriptRelPath = 'Classes/Plugins/Coins.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 | $this->init($conf); |
| 44 | 42 | |
| 45 | 43 | // get the tx_dpf.settings too |
@@ -89,8 +87,7 @@ discard block |
||
| 89 | 87 | * |
| 90 | 88 | * @return string The coins <span> ready for output |
| 91 | 89 | */ |
| 92 | - protected function generateCoins(array $metadata) |
|
| 93 | - { |
|
| 90 | + protected function generateCoins(array $metadata) { |
|
| 94 | 91 | |
| 95 | 92 | // The output follows the "Brief guide to Implementing OpenURL 1.0 Context Object for Journal Articles" |
| 96 | 93 | // -> https://archive.is/a0Hgs |
@@ -247,8 +244,7 @@ discard block |
||
| 247 | 244 | * |
| 248 | 245 | * @return Formatted date |
| 249 | 246 | */ |
| 250 | - protected function safelyFormatDate($format, $date) |
|
| 251 | - { |
|
| 247 | + protected function safelyFormatDate($format, $date) { |
|
| 252 | 248 | return (strlen($date) == 4) ? $date : date($format, strtotime($date)); |
| 253 | 249 | } |
| 254 | 250 | } |
@@ -46,14 +46,14 @@ |
||
| 46 | 46 | // Flexform wins over TS |
| 47 | 47 | $dpfTSconfig = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_dpf.']; |
| 48 | 48 | if (is_array($dpfTSconfig['settings.'])) { |
| 49 | - \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, true, false); |
|
| 49 | + \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, TRUE, FALSE); |
|
| 50 | 50 | $this->conf = $dpfTSconfig['settings.']; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - $this->setCache(true); |
|
| 53 | + $this->setCache(TRUE); |
|
| 54 | 54 | |
| 55 | 55 | $this->loadDocument(); |
| 56 | - if ($this->doc === null) { |
|
| 56 | + if ($this->doc === NULL) { |
|
| 57 | 57 | return; |
| 58 | 58 | } else { |
| 59 | 59 | // Set default values if not set. |