@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | class ClientConfigurationManager |
| 23 | 23 | { |
| 24 | 24 | |
| 25 | - /** |
|
| 25 | + /** |
|
| 26 | 26 | * objectManager |
| 27 | 27 | * |
| 28 | 28 | * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class); |
| 66 | 66 | $clientRepository = $objectManager->get(ClientRepository::class); |
| 67 | 67 | |
| 68 | - if (TYPO3_MODE === 'BE') |
|
| 69 | - { |
|
| 68 | + if (TYPO3_MODE === 'BE') |
|
| 69 | + { |
|
| 70 | 70 | $selectedPageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'); |
| 71 | 71 | if ($selectedPageId) |
| 72 | 72 | { |
@@ -77,15 +77,15 @@ discard block |
||
| 77 | 77 | $this->settings = $settings; //['settings']; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - } |
|
| 81 | - else |
|
| 82 | - { |
|
| 80 | + } |
|
| 81 | + else |
|
| 82 | + { |
|
| 83 | 83 | $this->client = $clientRepository->findAll()->current(); |
| 84 | 84 | |
| 85 | 85 | $configurationManager = $objectManager->get(ConfigurationManager::class); |
| 86 | - $this->settings = $configurationManager->getConfiguration( |
|
| 87 | - \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS |
|
| 88 | - ); |
|
| 86 | + $this->settings = $configurationManager->getConfiguration( |
|
| 87 | + \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS |
|
| 88 | + ); |
|
| 89 | 89 | |
| 90 | 90 | } |
| 91 | 91 | |
@@ -121,57 +121,57 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | public function getSwordHost() |
| 123 | 123 | { |
| 124 | - return $this->getSetting("swordHost","swordHost"); |
|
| 124 | + return $this->getSetting("swordHost","swordHost"); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - public function getSwordUser() |
|
| 127 | + public function getSwordUser() |
|
| 128 | 128 | { |
| 129 | - return $this->getSetting("swordUser","swordUser"); |
|
| 129 | + return $this->getSetting("swordUser","swordUser"); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - public function getSwordPassword() |
|
| 132 | + public function getSwordPassword() |
|
| 133 | 133 | { |
| 134 | - return $this->getSetting("swordPassword","swordPassword"); |
|
| 134 | + return $this->getSetting("swordPassword","swordPassword"); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | - public function getSwordCollectionNamespace() |
|
| 137 | + public function getSwordCollectionNamespace() |
|
| 138 | 138 | { |
| 139 | - return $this->getSetting("swordCollectionNamespace","swordCollectionNamespace"); |
|
| 139 | + return $this->getSetting("swordCollectionNamespace","swordCollectionNamespace"); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - public function getFedoraHost() |
|
| 142 | + public function getFedoraHost() |
|
| 143 | 143 | { |
| 144 | - return $this->getSetting("fedoraHost","fedoraHost"); |
|
| 144 | + return $this->getSetting("fedoraHost","fedoraHost"); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - public function getFedoraUser() |
|
| 147 | + public function getFedoraUser() |
|
| 148 | 148 | { |
| 149 | - return $this->getSetting("fedoraUser","fedoraUser"); |
|
| 149 | + return $this->getSetting("fedoraUser","fedoraUser"); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - public function getFedoraPassword() |
|
| 152 | + public function getFedoraPassword() |
|
| 153 | 153 | { |
| 154 | - return $this->getSetting("fedoraPassword","fedoraPassword"); |
|
| 154 | + return $this->getSetting("fedoraPassword","fedoraPassword"); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - public function getElasticSearchHost() |
|
| 157 | + public function getElasticSearchHost() |
|
| 158 | 158 | { |
| 159 | - return $this->getSetting("elasticSearchHost","elasticSearchHost"); |
|
| 159 | + return $this->getSetting("elasticSearchHost","elasticSearchHost"); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - public function getElasticSearchPort() |
|
| 162 | + public function getElasticSearchPort() |
|
| 163 | 163 | { |
| 164 | - return $this->getSetting("elasticSearchPort","elasticSearchPort"); |
|
| 164 | + return $this->getSetting("elasticSearchPort","elasticSearchPort"); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - public function getUploadDirectory() |
|
| 167 | + public function getUploadDirectory() |
|
| 168 | 168 | { |
| 169 | - return $this->getSetting("uploadDirectory","uploadDirectory"); |
|
| 169 | + return $this->getSetting("uploadDirectory","uploadDirectory"); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - public function getUploadDomain() |
|
| 172 | + public function getUploadDomain() |
|
| 173 | 173 | { |
| 174 | - return $this->getSetting("uploadDomain","uploadDomain"); |
|
| 174 | + return $this->getSetting("uploadDomain","uploadDomain"); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * |
| 44 | 44 | * @var array |
| 45 | 45 | */ |
| 46 | - protected $settings = array(); |
|
| 46 | + protected $settings = array (); |
|
| 47 | 47 | |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @var array |
| 60 | 60 | */ |
| 61 | - protected $extensionConfiguration = array(); |
|
| 61 | + protected $extensionConfiguration = array (); |
|
| 62 | 62 | |
| 63 | 63 | public function __construct() |
| 64 | 64 | { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $this->client = $clientRepository->findAll()->current(); |
| 74 | 74 | |
| 75 | 75 | $configurationManager = $objectManager->get(BackendConfigurationManager::class); |
| 76 | - $settings = $configurationManager->getConfiguration(NULL,NULL); |
|
| 76 | + $settings = $configurationManager->getConfiguration(NULL, NULL); |
|
| 77 | 77 | $this->settings = $settings; //['settings']; |
| 78 | 78 | } |
| 79 | 79 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | { |
| 103 | 103 | $setting = NULL; |
| 104 | 104 | if ($this->client) { |
| 105 | - $setting = trim($this->client->{"get".ucfirst($settingName)}()); |
|
| 105 | + $setting = trim($this->client->{"get" . ucfirst($settingName)}()); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // use global extConfig if client settings is empty |
@@ -121,57 +121,57 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | public function getSwordHost() |
| 123 | 123 | { |
| 124 | - return $this->getSetting("swordHost","swordHost"); |
|
| 124 | + return $this->getSetting("swordHost", "swordHost"); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | public function getSwordUser() |
| 128 | 128 | { |
| 129 | - return $this->getSetting("swordUser","swordUser"); |
|
| 129 | + return $this->getSetting("swordUser", "swordUser"); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | public function getSwordPassword() |
| 133 | 133 | { |
| 134 | - return $this->getSetting("swordPassword","swordPassword"); |
|
| 134 | + return $this->getSetting("swordPassword", "swordPassword"); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | public function getSwordCollectionNamespace() |
| 138 | 138 | { |
| 139 | - return $this->getSetting("swordCollectionNamespace","swordCollectionNamespace"); |
|
| 139 | + return $this->getSetting("swordCollectionNamespace", "swordCollectionNamespace"); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | public function getFedoraHost() |
| 143 | 143 | { |
| 144 | - return $this->getSetting("fedoraHost","fedoraHost"); |
|
| 144 | + return $this->getSetting("fedoraHost", "fedoraHost"); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | public function getFedoraUser() |
| 148 | 148 | { |
| 149 | - return $this->getSetting("fedoraUser","fedoraUser"); |
|
| 149 | + return $this->getSetting("fedoraUser", "fedoraUser"); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | public function getFedoraPassword() |
| 153 | 153 | { |
| 154 | - return $this->getSetting("fedoraPassword","fedoraPassword"); |
|
| 154 | + return $this->getSetting("fedoraPassword", "fedoraPassword"); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | public function getElasticSearchHost() |
| 158 | 158 | { |
| 159 | - return $this->getSetting("elasticSearchHost","elasticSearchHost"); |
|
| 159 | + return $this->getSetting("elasticSearchHost", "elasticSearchHost"); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | public function getElasticSearchPort() |
| 163 | 163 | { |
| 164 | - return $this->getSetting("elasticSearchPort","elasticSearchPort"); |
|
| 164 | + return $this->getSetting("elasticSearchPort", "elasticSearchPort"); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | public function getUploadDirectory() |
| 168 | 168 | { |
| 169 | - return $this->getSetting("uploadDirectory","uploadDirectory"); |
|
| 169 | + return $this->getSetting("uploadDirectory", "uploadDirectory"); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | public function getUploadDomain() |
| 173 | 173 | { |
| 174 | - return $this->getSetting("uploadDomain","uploadDomain"); |
|
| 174 | + return $this->getSetting("uploadDomain", "uploadDomain"); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | } |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | use TYPO3\CMS\Extbase\Object\ObjectManager; |
| 20 | 20 | use EWW\Dpf\Domain\Repository\ClientRepository; |
| 21 | 21 | |
| 22 | -class ClientConfigurationManager |
|
| 23 | -{ |
|
| 22 | +class ClientConfigurationManager { |
|
| 24 | 23 | |
| 25 | 24 | /** |
| 26 | 25 | * objectManager |
@@ -60,16 +59,13 @@ discard block |
||
| 60 | 59 | */ |
| 61 | 60 | protected $extensionConfiguration = array(); |
| 62 | 61 | |
| 63 | - public function __construct() |
|
| 64 | - { |
|
| 62 | + public function __construct() { |
|
| 65 | 63 | $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class); |
| 66 | 64 | $clientRepository = $objectManager->get(ClientRepository::class); |
| 67 | 65 | |
| 68 | - if (TYPO3_MODE === 'BE') |
|
| 69 | - { |
|
| 66 | + if (TYPO3_MODE === 'BE') { |
|
| 70 | 67 | $selectedPageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'); |
| 71 | - if ($selectedPageId) |
|
| 72 | - { |
|
| 68 | + if ($selectedPageId) { |
|
| 73 | 69 | $this->client = $clientRepository->findAll()->current(); |
| 74 | 70 | |
| 75 | 71 | $configurationManager = $objectManager->get(BackendConfigurationManager::class); |
@@ -77,9 +73,7 @@ discard block |
||
| 77 | 73 | $this->settings = $settings; //['settings']; |
| 78 | 74 | } |
| 79 | 75 | |
| 80 | - } |
|
| 81 | - else |
|
| 82 | - { |
|
| 76 | + } else { |
|
| 83 | 77 | $this->client = $clientRepository->findAll()->current(); |
| 84 | 78 | |
| 85 | 79 | $configurationManager = $objectManager->get(ConfigurationManager::class); |
@@ -98,8 +92,7 @@ discard block |
||
| 98 | 92 | * |
| 99 | 93 | * @var array |
| 100 | 94 | */ |
| 101 | - public function getSetting($settingName, $extConfig = NULL) |
|
| 102 | - { |
|
| 95 | + public function getSetting($settingName, $extConfig = NULL) { |
|
| 103 | 96 | $setting = NULL; |
| 104 | 97 | if ($this->client) { |
| 105 | 98 | $setting = trim($this->client->{"get".ucfirst($settingName)}()); |
@@ -114,63 +107,51 @@ discard block |
||
| 114 | 107 | } |
| 115 | 108 | |
| 116 | 109 | |
| 117 | - public function getOwnerId() |
|
| 118 | - { |
|
| 110 | + public function getOwnerId() { |
|
| 119 | 111 | return $this->getSetting("ownerId"); |
| 120 | 112 | } |
| 121 | 113 | |
| 122 | - public function getSwordHost() |
|
| 123 | - { |
|
| 114 | + public function getSwordHost() { |
|
| 124 | 115 | return $this->getSetting("swordHost","swordHost"); |
| 125 | 116 | } |
| 126 | 117 | |
| 127 | - public function getSwordUser() |
|
| 128 | - { |
|
| 118 | + public function getSwordUser() { |
|
| 129 | 119 | return $this->getSetting("swordUser","swordUser"); |
| 130 | 120 | } |
| 131 | 121 | |
| 132 | - public function getSwordPassword() |
|
| 133 | - { |
|
| 122 | + public function getSwordPassword() { |
|
| 134 | 123 | return $this->getSetting("swordPassword","swordPassword"); |
| 135 | 124 | } |
| 136 | 125 | |
| 137 | - public function getSwordCollectionNamespace() |
|
| 138 | - { |
|
| 126 | + public function getSwordCollectionNamespace() { |
|
| 139 | 127 | return $this->getSetting("swordCollectionNamespace","swordCollectionNamespace"); |
| 140 | 128 | } |
| 141 | 129 | |
| 142 | - public function getFedoraHost() |
|
| 143 | - { |
|
| 130 | + public function getFedoraHost() { |
|
| 144 | 131 | return $this->getSetting("fedoraHost","fedoraHost"); |
| 145 | 132 | } |
| 146 | 133 | |
| 147 | - public function getFedoraUser() |
|
| 148 | - { |
|
| 134 | + public function getFedoraUser() { |
|
| 149 | 135 | return $this->getSetting("fedoraUser","fedoraUser"); |
| 150 | 136 | } |
| 151 | 137 | |
| 152 | - public function getFedoraPassword() |
|
| 153 | - { |
|
| 138 | + public function getFedoraPassword() { |
|
| 154 | 139 | return $this->getSetting("fedoraPassword","fedoraPassword"); |
| 155 | 140 | } |
| 156 | 141 | |
| 157 | - public function getElasticSearchHost() |
|
| 158 | - { |
|
| 142 | + public function getElasticSearchHost() { |
|
| 159 | 143 | return $this->getSetting("elasticSearchHost","elasticSearchHost"); |
| 160 | 144 | } |
| 161 | 145 | |
| 162 | - public function getElasticSearchPort() |
|
| 163 | - { |
|
| 146 | + public function getElasticSearchPort() { |
|
| 164 | 147 | return $this->getSetting("elasticSearchPort","elasticSearchPort"); |
| 165 | 148 | } |
| 166 | 149 | |
| 167 | - public function getUploadDirectory() |
|
| 168 | - { |
|
| 150 | + public function getUploadDirectory() { |
|
| 169 | 151 | return $this->getSetting("uploadDirectory","uploadDirectory"); |
| 170 | 152 | } |
| 171 | 153 | |
| 172 | - public function getUploadDomain() |
|
| 173 | - { |
|
| 154 | + public function getUploadDomain() { |
|
| 174 | 155 | return $this->getSetting("uploadDomain","uploadDomain"); |
| 175 | 156 | } |
| 176 | 157 | |