Skip to content

Commit

Permalink
[TASK] #23 - use new configuration api
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lorenz committed Aug 17, 2018
1 parent 060c1cc commit 5f4d804
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions Classes/Hooks/GoogleMapHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'];
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5f4d804

Please sign in to comment.