diff --git a/Classes/Hooks/GoogleMapHook.php b/Classes/Hooks/GoogleMapHook.php index 1765445..4cb2c0b 100755 --- a/Classes/Hooks/GoogleMapHook.php +++ b/Classes/Hooks/GoogleMapHook.php @@ -14,6 +14,8 @@ * * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; +use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Google Map Hook @@ -101,11 +103,11 @@ public function render($params, $fObj) { $this->init($params); - $extensionConfArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['contacts']); - $googleMapsLibrary = $extensionConfArr['googleMapsLibrary']; + $googleMapsLibrary = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('contacts', 'googleMapsLibrary'); + $googleMapsApiKey = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('contacts', 'googleMapsApiKey'); - if ($extensionConfArr['googleMapsApiKey']) { - $googleMapsLibrary .= '&key=' . $extensionConfArr['googleMapsApiKey']; + if ($googleMapsApiKey) { + $googleMapsLibrary .= '&key=' . $googleMapsApiKey; } $this->tableName = $params['table']; diff --git a/composer.json b/composer.json index fd1f2ce..9b27509 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,8 @@ }, "require": { "php": ">=7.2.0 <7.3", - "typo3/cms-core": "^9.3" + "typo3/cms-core": "^9.3", + "typo3/cms-extbase": "^9.3" }, "require-dev": { "nimut/testing-framework": "^4.0",