Skip to content

Commit

Permalink
use config property on editable classes, fixes #146 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat authored Jan 21, 2021
1 parent 3b73993 commit d195824
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Just click the "update" button or execute the migration command to finish the bu

#### Update from Version 3.2.2 to Version 3.2.3
- **[NEW FEATURE]**: Pimcore 6.8.0 ready
- **[BUGFIX]**: Use `config` property on Pimcore >= 6.8 [#146](https://github.com/dachcom-digital/pimcore-toolbox/issues/146)

#### Update from Version 3.2.1 to Version 3.2.2
- **[NEW FEATURE]** : UIkit3 theme added [@AndiKeiser](https://github.com/dachcom-digital/pimcore-toolbox/pull/138)
Expand Down
9 changes: 6 additions & 3 deletions src/ToolboxBundle/Model/Document/Tag/GoogleMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ public function getData()
*/
public function frontend()
{
// @todo: remove with toolbox 4.0
$configData = property_exists($this, 'config') ? $this->config : $this->options;

$dataAttr = [];
$dataAttr['data-locations'] = json_encode($this->data);
$dataAttr['data-show-info-window-on-load'] = $this->options['iwOnInit'];
$dataAttr['data-show-info-window-on-load'] = $configData['iwOnInit'];

$dataAttr['data-mapoption-zoom'] = $this->options['mapZoom'];
$dataAttr['data-mapoption-map-type-id'] = $this->options['mapType'];
$dataAttr['data-mapoption-zoom'] = $configData['mapZoom'];
$dataAttr['data-mapoption-map-type-id'] = $configData['mapType'];

/** @var ConfigManager $configManager */
$configManager = \Pimcore::getContainer()->get(ConfigManager::class);
Expand Down

0 comments on commit d195824

Please sign in to comment.