@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | // Checkbox for commit |
| 59 | 59 | $fieldName = 'commit'; |
| 60 | - $fieldId = 'task_' . $fieldName; |
|
| 61 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($taskInfo['commit'] ? ' checked="checked"' : '') . '>'; |
|
| 60 | + $fieldId = 'task_'.$fieldName; |
|
| 61 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($taskInfo['commit'] ? ' checked="checked"' : '').'>'; |
|
| 62 | 62 | $additionalFields[$fieldId] = [ |
| 63 | 63 | 'code' => $fieldHtml, |
| 64 | 64 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.commit', |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | // Checkbox for optimize |
| 70 | 70 | $fieldName = 'optimize'; |
| 71 | - $fieldId = 'task_' . $fieldName; |
|
| 72 | - $fieldHtml = '<input type="checkbox" name="tx_scheduler[' . $fieldName . ']" id="' . $fieldId . '" value="1"' . ($taskInfo['optimize'] ? ' checked="checked"' : '') . '>'; |
|
| 71 | + $fieldId = 'task_'.$fieldName; |
|
| 72 | + $fieldHtml = '<input type="checkbox" name="tx_scheduler['.$fieldName.']" id="'.$fieldId.'" value="1"'.($taskInfo['optimize'] ? ' checked="checked"' : '').'>'; |
|
| 73 | 73 | $additionalFields[$fieldId] = [ |
| 74 | 74 | 'code' => $fieldHtml, |
| 75 | 75 | 'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_tasks.xlf:additionalFields.optimize', |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class OptimizeAdditionalFieldProvider extends BaseAdditionalFieldProvider |
|
| 29 | -{ |
|
| 28 | +class OptimizeAdditionalFieldProvider 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 */ |
@@ -46,8 +46,8 @@ |
||
| 46 | 46 | $taskInfo['optimize'] = $task->isOptimize(); |
| 47 | 47 | } else { |
| 48 | 48 | $taskInfo['solr'] = - 1; |
| 49 | - $taskInfo['commit'] = false; |
|
| 50 | - $taskInfo['optimize'] = false; |
|
| 49 | + $taskInfo['commit'] = FALSE; |
|
| 50 | + $taskInfo['optimize'] = FALSE; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $additionalFields = []; |
@@ -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 |
@@ -110,8 +109,7 @@ discard block |
||
| 110 | 109 | */ |
| 111 | 110 | protected bool $optimize = false; |
| 112 | 111 | |
| 113 | - public function execute() |
|
| 114 | - { |
|
| 112 | + public function execute() { |
|
| 115 | 113 | return true; |
| 116 | 114 | } |
| 117 | 115 | |
@@ -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 |
@@ -96,23 +96,23 @@ discard block |
||
| 96 | 96 | * @access protected |
| 97 | 97 | * @var bool |
| 98 | 98 | */ |
| 99 | - protected bool $softCommit = false; |
|
| 99 | + protected bool $softCommit = FALSE; |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * @access protected |
| 103 | 103 | * @var bool |
| 104 | 104 | */ |
| 105 | - protected bool $commit = false; |
|
| 105 | + protected bool $commit = FALSE; |
|
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * @access protected |
| 109 | 109 | * @var bool |
| 110 | 110 | */ |
| 111 | - protected bool $optimize = false; |
|
| 111 | + protected bool $optimize = FALSE; |
|
| 112 | 112 | |
| 113 | 113 | public function execute() |
| 114 | 114 | { |
| 115 | - return true; |
|
| 115 | + return TRUE; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | $message, |
| 390 | 390 | '', |
| 391 | 391 | $severity == FlashMessage::ERROR ? FlashMessage::ERROR : FlashMessage::OK, |
| 392 | - true, |
|
| 392 | + TRUE, |
|
| 393 | 393 | 'core.template.flashMessages' |
| 394 | 394 | ); |
| 395 | 395 | } |
@@ -66,15 +66,15 @@ 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) . '_scoretool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.scoretool'; |
|
| 70 | -$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'; |
|
| 71 | -$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'; |
|
| 72 | -$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'; |
|
| 73 | -$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'; |
|
| 74 | -$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'; |
|
| 75 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_modeldownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.modeldownloadtool'; |
|
| 76 | -$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'; |
|
| 77 | -$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).'_scoretool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.scoretool'; |
|
| 70 | +$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'; |
|
| 71 | +$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'; |
|
| 72 | +$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'; |
|
| 73 | +$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'; |
|
| 74 | +$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'; |
|
| 75 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_modeldownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_toolbox.modeldownloadtool'; |
|
| 76 | +$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'; |
|
| 77 | +$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'; |
|
| 78 | 78 | // Register hooks. |
| 79 | 79 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
| 80 | 80 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | ]; |
| 113 | 113 | // Register AJAX eID handlers. |
| 114 | 114 | if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) { |
| 115 | - $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main'; |
|
| 115 | + $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main'; |
|
| 116 | 116 | } |
| 117 | 117 | // Use Caching Framework for Solr queries |
| 118 | 118 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] ??= []; |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | 'additionalFields' => \Kitodo\Dlf\Task\SuggestBuildAdditionalFieldProvider::class, |
| 118 | 118 | ]; |
| 119 | 119 | // Register AJAX eID handlers. |
| 120 | -if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? false) { |
|
| 120 | +if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['general']['enableInternalProxy'] ?? FALSE) { |
|
| 121 | 121 | $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main'; |
| 122 | 122 | } |
| 123 | 123 | // Use Caching Framework for Solr queries |
@@ -25,8 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class SuggestBuildAdditionalFieldProvider extends BaseAdditionalFieldProvider |
|
| 29 | -{ |
|
| 28 | +class SuggestBuildAdditionalFieldProvider 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 */ |
@@ -23,10 +23,8 @@ |
||
| 23 | 23 | * |
| 24 | 24 | * @access public |
| 25 | 25 | */ |
| 26 | -class SuggestBuildTask extends BaseTask |
|
| 27 | -{ |
|
| 28 | - public function execute() |
|
| 29 | - { |
|
| 26 | +class SuggestBuildTask extends BaseTask { |
|
| 27 | + public function execute() { |
|
| 30 | 28 | $inputArray = []; |
| 31 | 29 | $inputArray['-s'] = $this->solr; |
| 32 | 30 | |
@@ -74,12 +74,12 @@ |
||
| 74 | 74 | $solr = Solr::getInstance($input->getOption('solr')); |
| 75 | 75 | // Connect to Solr server. |
| 76 | 76 | if (!$solr->ready) { |
| 77 | - $io->error('ERROR: Connection to Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
| 77 | + $io->error('ERROR: Connection to Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
| 78 | 78 | return BaseCommand::FAILURE; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | if (!$solr->suggestBuild()) { |
| 82 | - $io->error('ERROR: Sending the command suggest.build=true to Solr core ("' . $input->getOption('solr') . '") not possible \n'); |
|
| 82 | + $io->error('ERROR: Sending the command suggest.build=true to Solr core ("'.$input->getOption('solr').'") not possible \n'); |
|
| 83 | 83 | return BaseCommand::FAILURE; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -27,8 +27,7 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @access public |
| 29 | 29 | */ |
| 30 | -class SuggestBuildCommand extends Command |
|
| 31 | -{ |
|
| 30 | +class SuggestBuildCommand extends Command { |
|
| 32 | 31 | |
| 33 | 32 | /** |
| 34 | 33 | * Configure the command by defining the name, options and arguments |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | { |
| 47 | 47 | $xsd = '<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">'; |
| 48 | 48 | foreach ($this->schemes as $scheme) { |
| 49 | - $xsd .= '<xs:import namespace="' . $scheme["namespace"] . '" schemaLocation="' . $scheme["schemaLocation"] . '"/>'; |
|
| 49 | + $xsd .= '<xs:import namespace="'.$scheme["namespace"].'" schemaLocation="'.$scheme["schemaLocation"].'"/>'; |
|
| 50 | 50 | } |
| 51 | 51 | $xsd .= '</xs:schema>'; |
| 52 | 52 | return $value->schemaValidateSource($xsd); |
@@ -24,14 +24,12 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class XmlSchemesValidator extends AbstractDlfValidator |
|
| 28 | -{ |
|
| 27 | +class XmlSchemesValidator extends AbstractDlfValidator { |
|
| 29 | 28 | use LibXmlTrait; |
| 30 | 29 | |
| 31 | 30 | private array $schemes; |
| 32 | 31 | |
| 33 | - public function __construct(array $configuration) |
|
| 34 | - { |
|
| 32 | + public function __construct(array $configuration) { |
|
| 35 | 33 | parent::__construct(DOMDocument::class); |
| 36 | 34 | $this->schemes = $configuration; |
| 37 | 35 | } |
@@ -22,10 +22,8 @@ |
||
| 22 | 22 | * |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class DOMDocumentValidationStack extends AbstractDlfValidationStack |
|
| 26 | -{ |
|
| 27 | - public function __construct(array $configuration) |
|
| 28 | - { |
|
| 25 | +class DOMDocumentValidationStack extends AbstractDlfValidationStack { |
|
| 26 | + public function __construct(array $configuration) { |
|
| 29 | 27 | parent::__construct(\DOMDocument::class); |
| 30 | 28 | $this->addValidators($configuration); |
| 31 | 29 | } |
@@ -14,8 +14,7 @@ |
||
| 14 | 14 | * LICENSE.txt file that was distributed with this source code. |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -trait LibXmlTrait |
|
| 18 | -{ |
|
| 17 | +trait LibXmlTrait { |
|
| 19 | 18 | /** |
| 20 | 19 | * Add the errors from the libxml error buffer as validation error. |
| 21 | 20 | * |
@@ -34,11 +34,11 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function enableErrorBuffer(): void |
| 36 | 36 | { |
| 37 | - libxml_use_internal_errors(true); |
|
| 37 | + libxml_use_internal_errors(TRUE); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function disableErrorBuffer(): void |
| 41 | 41 | { |
| 42 | - libxml_use_internal_errors(false); |
|
| 42 | + libxml_use_internal_errors(FALSE); |
|
| 43 | 43 | } |
| 44 | 44 | } |