mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 19:13:55 +01:00
Add support for hofff/contao-consent-bridge #81
This commit is contained in:
@@ -42,8 +42,12 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"contao/manager-plugin": "^2.1",
|
"contao/manager-plugin": "^2.1",
|
||||||
|
"hofff/contao-consent-bridge": "^1.0",
|
||||||
"phpcq/all-tasks": "^1.2"
|
"phpcq/all-tasks": "^1.2"
|
||||||
},
|
},
|
||||||
|
"conflict": {
|
||||||
|
"hofff/contao-consent-bridge": "<1.0 || >= 2.0"
|
||||||
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.1.x-dev",
|
"dev-master": "3.1.x-dev",
|
||||||
|
|||||||
37
src/Bundle/ConsentBridge/Plugin.php
Normal file
37
src/Bundle/ConsentBridge/Plugin.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Leaflet maps for Contao CMS.
|
||||||
|
*
|
||||||
|
* @package contao-leaflet-maps
|
||||||
|
* @author David Molineus <david.molineus@netzmacht.de>
|
||||||
|
* @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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -138,3 +138,7 @@ services:
|
|||||||
arguments:
|
arguments:
|
||||||
- '@twig'
|
- '@twig'
|
||||||
- '%kernel.project_dir%'
|
- '%kernel.project_dir%'
|
||||||
|
|
||||||
|
Netzmacht\Contao\Leaflet\Bundle\ConsentBridge\Plugin:
|
||||||
|
tags:
|
||||||
|
- { name: hofff_contao_consent_bridge.plugin }
|
||||||
Reference in New Issue
Block a user