@@ -18,88 +18,88 @@ |
||
| 18 | 18 | class RelationAnalyserTool extends AbstractTool |
| 19 | 19 | { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Display the title of the tool on the welcome screen. |
|
| 23 | - * |
|
| 24 | - * @return string |
|
| 25 | - */ |
|
| 26 | - public function getTitle(): string |
|
| 27 | - { |
|
| 28 | - return LocalizationUtility::translate( |
|
| 29 | - 'analyse_relations', |
|
| 30 | - 'vidi' |
|
| 31 | - ); |
|
| 32 | - } |
|
| 21 | + /** |
|
| 22 | + * Display the title of the tool on the welcome screen. |
|
| 23 | + * |
|
| 24 | + * @return string |
|
| 25 | + */ |
|
| 26 | + public function getTitle(): string |
|
| 27 | + { |
|
| 28 | + return LocalizationUtility::translate( |
|
| 29 | + 'analyse_relations', |
|
| 30 | + 'vidi' |
|
| 31 | + ); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Display the description of the tool in the welcome screen. |
|
| 36 | - * |
|
| 37 | - * @return string |
|
| 38 | - */ |
|
| 39 | - public function getDescription(): string |
|
| 40 | - { |
|
| 41 | - $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html'; |
|
| 42 | - $view = $this->initializeStandaloneView($templateNameAndPath); |
|
| 43 | - $view->assign('sitePath', Environment::getPublicPath() . '/'); |
|
| 44 | - $view->assign('dataType', $this->getModuleLoader()->getDataType()); |
|
| 45 | - return $view->render(); |
|
| 46 | - } |
|
| 34 | + /** |
|
| 35 | + * Display the description of the tool in the welcome screen. |
|
| 36 | + * |
|
| 37 | + * @return string |
|
| 38 | + */ |
|
| 39 | + public function getDescription(): string |
|
| 40 | + { |
|
| 41 | + $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html'; |
|
| 42 | + $view = $this->initializeStandaloneView($templateNameAndPath); |
|
| 43 | + $view->assign('sitePath', Environment::getPublicPath() . '/'); |
|
| 44 | + $view->assign('dataType', $this->getModuleLoader()->getDataType()); |
|
| 45 | + return $view->render(); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * Do the job |
|
| 50 | - * |
|
| 51 | - * @param array $arguments |
|
| 52 | - * @return string |
|
| 53 | - */ |
|
| 54 | - public function work(array $arguments = array()): string |
|
| 55 | - { |
|
| 48 | + /** |
|
| 49 | + * Do the job |
|
| 50 | + * |
|
| 51 | + * @param array $arguments |
|
| 52 | + * @return string |
|
| 53 | + */ |
|
| 54 | + public function work(array $arguments = array()): string |
|
| 55 | + { |
|
| 56 | 56 | |
| 57 | - $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/WorkResult.html'; |
|
| 58 | - $view = $this->initializeStandaloneView($templateNameAndPath); |
|
| 57 | + $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/WorkResult.html'; |
|
| 58 | + $view = $this->initializeStandaloneView($templateNameAndPath); |
|
| 59 | 59 | |
| 60 | - $dataType = $this->getModuleLoader()->getDataType(); |
|
| 61 | - $analyse = $this->getGridAnalyserService()->checkRelationForTable($dataType); |
|
| 60 | + $dataType = $this->getModuleLoader()->getDataType(); |
|
| 61 | + $analyse = $this->getGridAnalyserService()->checkRelationForTable($dataType); |
|
| 62 | 62 | |
| 63 | - if (empty($analyse)) { |
|
| 64 | - $result = 'No relation involved in this Grid.'; |
|
| 65 | - } else { |
|
| 66 | - $result = implode("\n", $analyse); |
|
| 67 | - } |
|
| 63 | + if (empty($analyse)) { |
|
| 64 | + $result = 'No relation involved in this Grid.'; |
|
| 65 | + } else { |
|
| 66 | + $result = implode("\n", $analyse); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - $view->assign('result', $result); |
|
| 70 | - $view->assign('dataType', $dataType); |
|
| 69 | + $view->assign('result', $result); |
|
| 70 | + $view->assign('dataType', $dataType); |
|
| 71 | 71 | |
| 72 | - return $view->render(); |
|
| 73 | - } |
|
| 72 | + return $view->render(); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * Tell whether the tools should be displayed according to the context. |
|
| 77 | - * |
|
| 78 | - * @return bool |
|
| 79 | - */ |
|
| 80 | - public function isShown(): bool |
|
| 81 | - { |
|
| 82 | - return $this->getBackendUser()->isAdmin(); |
|
| 83 | - } |
|
| 75 | + /** |
|
| 76 | + * Tell whether the tools should be displayed according to the context. |
|
| 77 | + * |
|
| 78 | + * @return bool |
|
| 79 | + */ |
|
| 80 | + public function isShown(): bool |
|
| 81 | + { |
|
| 82 | + return $this->getBackendUser()->isAdmin(); |
|
| 83 | + } |
|
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * Get the Vidi Module Loader. |
|
| 87 | - * |
|
| 88 | - * @return \Fab\Vidi\Module\ModuleLoader|object |
|
| 89 | - */ |
|
| 90 | - protected function getModuleLoader(): \Fab\Vidi\Module\ModuleLoader |
|
| 91 | - { |
|
| 92 | - return GeneralUtility::makeInstance(\Fab\Vidi\Module\ModuleLoader::class); |
|
| 93 | - } |
|
| 85 | + /** |
|
| 86 | + * Get the Vidi Module Loader. |
|
| 87 | + * |
|
| 88 | + * @return \Fab\Vidi\Module\ModuleLoader|object |
|
| 89 | + */ |
|
| 90 | + protected function getModuleLoader(): \Fab\Vidi\Module\ModuleLoader |
|
| 91 | + { |
|
| 92 | + return GeneralUtility::makeInstance(\Fab\Vidi\Module\ModuleLoader::class); |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - /** |
|
| 96 | - * Get the Vidi Module Loader. |
|
| 97 | - * |
|
| 98 | - * @return \Fab\Vidi\Grid\GridAnalyserService|object |
|
| 99 | - */ |
|
| 100 | - protected function getGridAnalyserService() |
|
| 101 | - { |
|
| 102 | - return GeneralUtility::makeInstance(\Fab\Vidi\Grid\GridAnalyserService::class); |
|
| 103 | - } |
|
| 95 | + /** |
|
| 96 | + * Get the Vidi Module Loader. |
|
| 97 | + * |
|
| 98 | + * @return \Fab\Vidi\Grid\GridAnalyserService|object |
|
| 99 | + */ |
|
| 100 | + protected function getGridAnalyserService() |
|
| 101 | + { |
|
| 102 | + return GeneralUtility::makeInstance(\Fab\Vidi\Grid\GridAnalyserService::class); |
|
| 103 | + } |
|
| 104 | 104 | } |
| 105 | 105 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/RelationAnalyser/Launcher.html'; |
| 42 | 42 | $view = $this->initializeStandaloneView($templateNameAndPath); |
| 43 | - $view->assign('sitePath', Environment::getPublicPath() . '/'); |
|
| 43 | + $view->assign('sitePath', Environment::getPublicPath().'/'); |
|
| 44 | 44 | $view->assign('dataType', $this->getModuleLoader()->getDataType()); |
| 45 | 45 | return $view->render(); |
| 46 | 46 | } |
@@ -19,77 +19,77 @@ |
||
| 19 | 19 | class ConfiguredPidTool extends AbstractTool |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * Display the title of the tool on the welcome screen. |
|
| 24 | - * |
|
| 25 | - * @return string |
|
| 26 | - */ |
|
| 27 | - public function getTitle(): string |
|
| 28 | - { |
|
| 29 | - return sprintf('%s (%s)', |
|
| 30 | - LocalizationUtility::translate('tool.configured_pid', 'vidi'), |
|
| 31 | - $this->getModulePidService()->getConfiguredNewRecordPid() |
|
| 32 | - ); |
|
| 33 | - } |
|
| 22 | + /** |
|
| 23 | + * Display the title of the tool on the welcome screen. |
|
| 24 | + * |
|
| 25 | + * @return string |
|
| 26 | + */ |
|
| 27 | + public function getTitle(): string |
|
| 28 | + { |
|
| 29 | + return sprintf('%s (%s)', |
|
| 30 | + LocalizationUtility::translate('tool.configured_pid', 'vidi'), |
|
| 31 | + $this->getModulePidService()->getConfiguredNewRecordPid() |
|
| 32 | + ); |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Display the description of the tool in the welcome screen. |
|
| 37 | - * |
|
| 38 | - * @return string |
|
| 39 | - */ |
|
| 40 | - public function getDescription(): string |
|
| 41 | - { |
|
| 42 | - $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ConfiguredPid/Launcher.html'; |
|
| 43 | - $view = $this->initializeStandaloneView($templateNameAndPath); |
|
| 44 | - $view->assignMultiple([ |
|
| 45 | - 'sitePath' => Environment::getPublicPath() . '/', |
|
| 46 | - 'dataType' => $this->getModuleLoader()->getDataType(), |
|
| 47 | - 'configuredPid' => $this->getModulePidService()->getConfiguredNewRecordPid(), |
|
| 48 | - 'errors' => $this->getModulePidService()->validateConfiguredPid(), |
|
| 49 | - ]); |
|
| 35 | + /** |
|
| 36 | + * Display the description of the tool in the welcome screen. |
|
| 37 | + * |
|
| 38 | + * @return string |
|
| 39 | + */ |
|
| 40 | + public function getDescription(): string |
|
| 41 | + { |
|
| 42 | + $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ConfiguredPid/Launcher.html'; |
|
| 43 | + $view = $this->initializeStandaloneView($templateNameAndPath); |
|
| 44 | + $view->assignMultiple([ |
|
| 45 | + 'sitePath' => Environment::getPublicPath() . '/', |
|
| 46 | + 'dataType' => $this->getModuleLoader()->getDataType(), |
|
| 47 | + 'configuredPid' => $this->getModulePidService()->getConfiguredNewRecordPid(), |
|
| 48 | + 'errors' => $this->getModulePidService()->validateConfiguredPid(), |
|
| 49 | + ]); |
|
| 50 | 50 | |
| 51 | - return $view->render(); |
|
| 52 | - } |
|
| 51 | + return $view->render(); |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * Do the job |
|
| 56 | - * |
|
| 57 | - * @param array $arguments |
|
| 58 | - * @return string |
|
| 59 | - */ |
|
| 60 | - public function work(array $arguments = array()): string |
|
| 61 | - { |
|
| 62 | - return ''; |
|
| 63 | - } |
|
| 54 | + /** |
|
| 55 | + * Do the job |
|
| 56 | + * |
|
| 57 | + * @param array $arguments |
|
| 58 | + * @return string |
|
| 59 | + */ |
|
| 60 | + public function work(array $arguments = array()): string |
|
| 61 | + { |
|
| 62 | + return ''; |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - /** |
|
| 66 | - * Tell whether the tools should be displayed according to the context. |
|
| 67 | - * |
|
| 68 | - * @return bool |
|
| 69 | - */ |
|
| 70 | - public function isShown(): bool |
|
| 71 | - { |
|
| 72 | - return $this->getBackendUser()->isAdmin(); |
|
| 73 | - } |
|
| 65 | + /** |
|
| 66 | + * Tell whether the tools should be displayed according to the context. |
|
| 67 | + * |
|
| 68 | + * @return bool |
|
| 69 | + */ |
|
| 70 | + public function isShown(): bool |
|
| 71 | + { |
|
| 72 | + return $this->getBackendUser()->isAdmin(); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * Get the Vidi Module Loader. |
|
| 77 | - * |
|
| 78 | - * @return \Fab\Vidi\Module\ModuleLoader|object |
|
| 79 | - */ |
|
| 80 | - protected function getModuleLoader(): \Fab\Vidi\Module\ModuleLoader |
|
| 81 | - { |
|
| 82 | - return GeneralUtility::makeInstance(\Fab\Vidi\Module\ModuleLoader::class); |
|
| 83 | - } |
|
| 75 | + /** |
|
| 76 | + * Get the Vidi Module Loader. |
|
| 77 | + * |
|
| 78 | + * @return \Fab\Vidi\Module\ModuleLoader|object |
|
| 79 | + */ |
|
| 80 | + protected function getModuleLoader(): \Fab\Vidi\Module\ModuleLoader |
|
| 81 | + { |
|
| 82 | + return GeneralUtility::makeInstance(\Fab\Vidi\Module\ModuleLoader::class); |
|
| 83 | + } |
|
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * @return ModulePidService|object |
|
| 87 | - */ |
|
| 88 | - public function getModulePidService() |
|
| 89 | - { |
|
| 90 | - /** @var ModulePidService $modulePidService */ |
|
| 91 | - return GeneralUtility::makeInstance(ModulePidService::class); |
|
| 92 | - } |
|
| 85 | + /** |
|
| 86 | + * @return ModulePidService|object |
|
| 87 | + */ |
|
| 88 | + public function getModulePidService() |
|
| 89 | + { |
|
| 90 | + /** @var ModulePidService $modulePidService */ |
|
| 91 | + return GeneralUtility::makeInstance(ModulePidService::class); |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | 94 | } |
| 95 | 95 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $templateNameAndPath = 'EXT:vidi/Resources/Private/Standalone/Tool/ConfiguredPid/Launcher.html'; |
| 43 | 43 | $view = $this->initializeStandaloneView($templateNameAndPath); |
| 44 | 44 | $view->assignMultiple([ |
| 45 | - 'sitePath' => Environment::getPublicPath() . '/', |
|
| 45 | + 'sitePath' => Environment::getPublicPath().'/', |
|
| 46 | 46 | 'dataType' => $this->getModuleLoader()->getDataType(), |
| 47 | 47 | 'configuredPid' => $this->getModulePidService()->getConfiguredNewRecordPid(), |
| 48 | 48 | 'errors' => $this->getModulePidService()->validateConfiguredPid(), |