From 86026a473b43135d215d89d5aa1cc0f0a4535ed4 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 28 Aug 2020 17:14:33 +0200 Subject: [PATCH 1/2] Add support for hofff/contao-consent-bridge #81 --- composer.json | 4 ++ src/Bundle/ConsentBridge/Plugin.php | 37 +++++++++++++++++++ src/Bundle/Resources/config/services.yml | 4 ++ .../leaflet_consent_bridge_placeholder.html5 | 0 4 files changed, 45 insertions(+) create mode 100644 src/Bundle/ConsentBridge/Plugin.php create mode 100644 src/Bundle/Resources/contao/templates/leaflet_consent_bridge_placeholder.html5 diff --git a/composer.json b/composer.json index 3ab278f..e16ff54 100644 --- a/composer.json +++ b/composer.json @@ -42,8 +42,12 @@ }, "require-dev": { "contao/manager-plugin": "^2.1", + "hofff/contao-consent-bridge": "^1.0", "phpcq/all-tasks": "^1.2" }, + "conflict": { + "hofff/contao-consent-bridge": "<1.0 || >= 2.0" + }, "extra": { "branch-alias": { "dev-master": "3.1.x-dev", diff --git a/src/Bundle/ConsentBridge/Plugin.php b/src/Bundle/ConsentBridge/Plugin.php new file mode 100644 index 0000000..9fe9c32 --- /dev/null +++ b/src/Bundle/ConsentBridge/Plugin.php @@ -0,0 +1,37 @@ + + * @copyright 2014-2017 netzmacht David Molineus. All rights reserved. + * @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE + * @filesource + */ + +declare(strict_types=1); + +namespace Netzmacht\Contao\Leaflet\Bundle\ConsentBridge; + +use Hofff\Contao\Consent\Bridge\Bridge; +use Hofff\Contao\Consent\Bridge\Plugin as ConsentBridgePlugin; +use Hofff\Contao\Consent\Bridge\Render\RenderInformation; + +/** + * Consent Bridge plugin for leaflet. + */ +final class Plugin implements ConsentBridgePlugin +{ + /** + * {@inheritDoc} + */ + public function load(Bridge $bridge): void + { + $renderInformation = RenderInformation::autoRenderWithPlaceholder('leaflet_consent_bridge_placeholder'); + + $bridge + ->supportContentElement('leaflet', $renderInformation) + ->supportFrontendModule('leaflet', $renderInformation); + } +} diff --git a/src/Bundle/Resources/config/services.yml b/src/Bundle/Resources/config/services.yml index 5052736..05d9769 100644 --- a/src/Bundle/Resources/config/services.yml +++ b/src/Bundle/Resources/config/services.yml @@ -138,3 +138,7 @@ services: arguments: - '@twig' - '%kernel.project_dir%' + + Netzmacht\Contao\Leaflet\Bundle\ConsentBridge\Plugin: + tags: + - { name: hofff_contao_consent_bridge.plugin } \ No newline at end of file diff --git a/src/Bundle/Resources/contao/templates/leaflet_consent_bridge_placeholder.html5 b/src/Bundle/Resources/contao/templates/leaflet_consent_bridge_placeholder.html5 new file mode 100644 index 0000000..e69de29 From 6054def7aa0a07112e70fe8a26b9b176cc3bde6e Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 28 Aug 2020 17:19:04 +0200 Subject: [PATCH 2/2] Prepare release --- CHANGELOG.md | 9 ++++++++- composer.json | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa21a40..24b67d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.2.0] - 2020-08-28 + +### Added + + - Add support for consent tools based on `hofff/contao-consent-bridge` + ## [3.1.7] - 2020-08-28 ### Fixed @@ -151,7 +157,8 @@ Implemented enhancements - Bypass filesystem cache in debug mode - Changelog added -[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.7...hotfix/3.1.8 +[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.2.0...hotfix/3.2.1 +[3.2.0]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.7...3.2.0 [3.1.7]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.6...3.1.7 [3.1.6]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...3.1.6 [3.1.5]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.4...3.1.5 diff --git a/composer.json b/composer.json index e16ff54..07af2f6 100644 --- a/composer.json +++ b/composer.json @@ -50,8 +50,8 @@ }, "extra": { "branch-alias": { - "dev-master": "3.1.x-dev", - "dev-develop": "3.2.x-dev", + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev", "dev-support/2.x": "2.0.x-dev" }, "contao": {