@@ -23,8 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @access public |
25 | 25 | */ |
26 | -class BaseTask extends AbstractTask |
|
27 | -{ |
|
26 | +class BaseTask extends AbstractTask { |
|
28 | 27 | |
29 | 28 | /** |
30 | 29 | * @access protected |
@@ -92,8 +91,7 @@ discard block |
||
92 | 91 | */ |
93 | 92 | protected string $set = ''; |
94 | 93 | |
95 | - public function execute() |
|
96 | - { |
|
94 | + public function execute() { |
|
97 | 95 | return true; |
98 | 96 | } |
99 | 97 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @access protected |
31 | 31 | * @var bool |
32 | 32 | */ |
33 | - protected bool $dryRun = false; |
|
33 | + protected bool $dryRun = FALSE; |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @access protected |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * @access protected |
73 | 73 | * @var bool |
74 | 74 | */ |
75 | - protected bool $all = false; |
|
75 | + protected bool $all = FALSE; |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * @access protected |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | public function execute() |
96 | 96 | { |
97 | - return true; |
|
97 | + return TRUE; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $message, |
319 | 319 | '', |
320 | 320 | $severity == FlashMessage::ERROR ? FlashMessage::ERROR : FlashMessage::OK, |
321 | - true, |
|
321 | + TRUE, |
|
322 | 322 | 'core.template.flashMessages' |
323 | 323 | ); |
324 | 324 | } |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | |
64 | 64 | // Select for collection(s) |
65 | 65 | $fieldName = 'coll'; |
66 | - $fieldId = 'task_' . $fieldName; |
|
66 | + $fieldId = 'task_'.$fieldName; |
|
67 | 67 | $options = $this->getCollOptions($taskInfo['coll'], $taskInfo['pid']); |
68 | 68 | ; |
69 | - $fieldHtml = '<select name="tx_scheduler[' . $fieldName . '][]" id="' . $fieldId . '" size="10" multiple="multiple">' . implode("\n", $options) . '</select>'; |
|
69 | + $fieldHtml = '<select name="tx_scheduler['.$fieldName.'][]" id="'.$fieldId.'" size="10" multiple="multiple">'.implode("\n", $options).'</select>'; |
|
70 | 70 | $additionalFields[$fieldId] = [ |
71 | 71 | 'code' => $fieldHtml, |
72 | 72 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.coll', |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | |
86 | 86 | // Checkbox for all |
87 | 87 | $fieldName = 'all'; |
88 | - $fieldId = 'task_' . $fieldName; |
|
89 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . |
|
90 | - ($taskInfo['all'] ? ' checked="checked"' : '') . '>'; |
|
88 | + $fieldId = 'task_'.$fieldName; |
|
89 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'. |
|
90 | + ($taskInfo['all'] ? ' checked="checked"' : '').'>'; |
|
91 | 91 | $additionalFields[$fieldId] = [ |
92 | 92 | 'code' => $fieldHtml, |
93 | 93 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.all', |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $options = []; |
112 | 112 | $collections = $this->getCollections($pid); |
113 | 113 | foreach ($collections as $label => $uid) { |
114 | - $options[] = '<option value="' . $uid . '" ' . (in_array($uid, $coll) ? 'selected' : '') . ' >' . $label . '</option>'; |
|
114 | + $options[] = '<option value="'.$uid.'" '.(in_array($uid, $coll) ? 'selected' : '').' >'.$label.'</option>'; |
|
115 | 115 | } |
116 | 116 | return $options; |
117 | 117 | } |
@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @access public |
27 | 27 | */ |
28 | -class ReindexAdditionalFieldProvider extends BaseAdditionalFieldProvider |
|
29 | -{ |
|
28 | +class ReindexAdditionalFieldProvider extends BaseAdditionalFieldProvider { |
|
30 | 29 | /** |
31 | 30 | * Gets additional fields to render in the form to add/edit a task |
32 | 31 | * |
@@ -35,8 +34,7 @@ discard block |
||
35 | 34 | * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module |
36 | 35 | * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => '')) |
37 | 36 | */ |
38 | - public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) |
|
39 | - { |
|
37 | + public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) { |
|
40 | 38 | $currentSchedulerModuleAction = $schedulerModule->getCurrentAction(); |
41 | 39 | |
42 | 40 | /** @var BaseTask $task */ |
@@ -48,12 +48,12 @@ |
||
48 | 48 | $taskInfo['owner'] = $task->getOwner(); |
49 | 49 | $taskInfo['all'] = $task->isAll(); |
50 | 50 | } else { |
51 | - $taskInfo['dryRun'] = false; |
|
51 | + $taskInfo['dryRun'] = FALSE; |
|
52 | 52 | $taskInfo['coll'] = []; |
53 | 53 | $taskInfo['pid'] = - 1; |
54 | 54 | $taskInfo['solr'] = - 1; |
55 | 55 | $taskInfo['owner'] = ''; |
56 | - $taskInfo['all'] = false; |
|
56 | + $taskInfo['all'] = FALSE; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | $additionalFields = []; |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | $_EXTKEY = 'dlf'; |
67 | 67 | // Register tools for toolbox plugin. |
68 | 68 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = []; |
69 | -$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/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool'; |
|
70 | -$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/locallang_labels.xlf:tx_dlf_toolbox.annotationtool'; |
|
71 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool'; |
|
72 | -$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/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool'; |
|
73 | -$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/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool'; |
|
74 | -$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/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool'; |
|
75 | -$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/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool'; |
|
69 | +$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/locallang_labels.xlf:tx_dlf_toolbox.fulltexttool'; |
|
70 | +$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/locallang_labels.xlf:tx_dlf_toolbox.annotationtool'; |
|
71 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.fulltextdownloadtool'; |
|
72 | +$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/locallang_labels.xlf:tx_dlf_toolbox.imagedownloadtool'; |
|
73 | +$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/locallang_labels.xlf:tx_dlf_toolbox.imagemanipulationtool'; |
|
74 | +$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/locallang_labels.xlf:tx_dlf_toolbox.pdfdownloadtool'; |
|
75 | +$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/locallang_labels.xlf:tx_dlf_toolbox.searchindocumenttool'; |
|
76 | 76 | // Register hooks. |
77 | 77 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
78 | 78 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ]; |
99 | 99 | // Register AJAX eID handlers. |
100 | 100 | if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) { |
101 | - $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main'; |
|
101 | + $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main'; |
|
102 | 102 | } |
103 | 103 | // Use Caching Framework for Solr queries |
104 | 104 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] ??= []; |
@@ -97,7 +97,7 @@ |
||
97 | 97 | 'additionalFields' => \Kitodo\Dlf\Task\HarvestAdditionalFieldProvider::class, |
98 | 98 | ]; |
99 | 99 | // Register AJAX eID handlers. |
100 | -if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) { |
|
100 | +if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? FALSE) { |
|
101 | 101 | $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main'; |
102 | 102 | } |
103 | 103 | // Use Caching Framework for Solr queries |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $this->view->assign('is3DViewer', $this->is3dViewer($this->requestData['model'])); |
37 | 37 | $embedded3DViewerUrl = $this->buildEmbedded3dViewerUrl($this->requestData['model']); |
38 | 38 | if (!empty($this->requestData['viewer'])) { |
39 | - $embedded3DViewerUrl .= '&viewer=' . $this->requestData['viewer']; |
|
39 | + $embedded3DViewerUrl .= '&viewer='.$this->requestData['viewer']; |
|
40 | 40 | } |
41 | 41 | $this->view->assign('embedded3DViewerUrl', $embedded3DViewerUrl); |
42 | 42 | return; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function buildEmbedded3dViewerUrl(string $model): string |
74 | 74 | { |
75 | - return self::MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX . '&model=' . $model; |
|
75 | + return self::MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX.'&model='.$model; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 |
@@ -19,8 +19,7 @@ |
||
19 | 19 | * |
20 | 20 | * @access public |
21 | 21 | */ |
22 | -class View3DController extends AbstractController |
|
23 | -{ |
|
22 | +class View3DController extends AbstractController { |
|
24 | 23 | |
25 | 24 | const MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX = '/?middleware=dlf/embedded3DViewer'; |
26 | 25 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $modelInfo = PathUtility::pathinfo($parameters['model']); |
70 | 70 | $modelFormat = $modelInfo["extension"]; |
71 | 71 | if (empty($modelFormat)) { |
72 | - return $this->warningResponse('Model path "' . $parameters['model'] . '" has no extension format', $request); |
|
72 | + return $this->warningResponse('Model path "'.$parameters['model'].'" has no extension format', $request); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | if (empty($parameters['viewer'])) { |
@@ -88,30 +88,30 @@ discard block |
||
88 | 88 | $defaultStorage = $storageRepository->getDefaultStorage(); |
89 | 89 | |
90 | 90 | if (!$defaultStorage->hasFolder(self::VIEWER_FOLDER)) { |
91 | - return $this->errorResponse('Required folder "' . self::VIEWER_FOLDER . '" was not found in the default storage "' . $defaultStorage->getName() . '"', $request); |
|
91 | + return $this->errorResponse('Required folder "'.self::VIEWER_FOLDER.'" was not found in the default storage "'.$defaultStorage->getName().'"', $request); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $viewerModules = $defaultStorage->getFolder(self::VIEWER_FOLDER); |
95 | 95 | if (!$viewerModules->hasFolder($viewer)) { |
96 | - return $this->errorResponse('Viewer folder "' . $viewer . '" was not found under the folder "' . self::VIEWER_FOLDER . '"', $request); |
|
96 | + return $this->errorResponse('Viewer folder "'.$viewer.'" was not found under the folder "'.self::VIEWER_FOLDER.'"', $request); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $viewerFolder = $viewerModules->getSubfolder($viewer); |
100 | 100 | if (!$viewerFolder->hasFile(self::VIEWER_CONFIG_YML)) { |
101 | - return $this->errorResponse('Viewer folder "' . $viewer . '" does not contain a file named "' . self::VIEWER_CONFIG_YML . '"', $request); |
|
101 | + return $this->errorResponse('Viewer folder "'.$viewer.'" does not contain a file named "'.self::VIEWER_CONFIG_YML.'"', $request); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** @var YamlFileLoader $yamlFileLoader */ |
105 | 105 | $yamlFileLoader = GeneralUtility::makeInstance(YamlFileLoader::class); |
106 | - $viewerConfigPath = $defaultStorage->getName() . "/" . self::VIEWER_FOLDER . "/" . $viewer . "/"; |
|
107 | - $config = $yamlFileLoader->load($viewerConfigPath . self::VIEWER_CONFIG_YML)["viewer"]; |
|
106 | + $viewerConfigPath = $defaultStorage->getName()."/".self::VIEWER_FOLDER."/".$viewer."/"; |
|
107 | + $config = $yamlFileLoader->load($viewerConfigPath.self::VIEWER_CONFIG_YML)["viewer"]; |
|
108 | 108 | |
109 | 109 | if (!isset($config["supportedModelFormats"]) || empty($config["supportedModelFormats"])) { |
110 | - return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "' . self::VIEWER_CONFIG_YML . '" of viewer "' . $viewer . '" or has no value', $request); |
|
110 | + return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "'.self::VIEWER_CONFIG_YML.'" of viewer "'.$viewer.'" or has no value', $request); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === false) { |
114 | - return $this->warningResponse('Viewer "' . $viewer . '" does not support the model format "' . $modelFormat . '"', $request); |
|
114 | + return $this->warningResponse('Viewer "'.$viewer.'" does not support the model format "'.$modelFormat.'"', $request); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | $html = $this->getViewerHtml($config, $viewerConfigPath, $viewerFolder, $parameters['model'], $modelInfo); |
@@ -34,8 +34,7 @@ |
||
34 | 34 | * @subpackage dlf |
35 | 35 | * @access public |
36 | 36 | */ |
37 | -class Embedded3DViewer implements MiddlewareInterface |
|
38 | -{ |
|
37 | +class Embedded3DViewer implements MiddlewareInterface { |
|
39 | 38 | use LoggerAwareTrait; |
40 | 39 | |
41 | 40 | const VIEWER_FOLDER = "dlf_3d_viewers"; |
@@ -110,7 +110,7 @@ |
||
110 | 110 | return $this->errorResponse('Required key "supportedModelFormats" does not exist in the file "' . self::VIEWER_CONFIG_YML . '" of viewer "' . $viewer . '" or has no value', $request); |
111 | 111 | } |
112 | 112 | |
113 | - if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === false) { |
|
113 | + if (array_search(strtolower($modelFormat), array_map('strtolower', $config["supportedModelFormats"])) === FALSE) { |
|
114 | 114 | return $this->warningResponse('Viewer "' . $viewer . '" does not support the model format "' . $modelFormat . '"', $request); |
115 | 115 | } |
116 | 116 |