Add plugin and bundle.

This commit is contained in:
David Molineus
2017-10-05 16:31:15 +02:00
parent 20b9144b89
commit a3ac7262f0
3 changed files with 69 additions and 6 deletions

View File

@@ -33,7 +33,8 @@
"doctrine/cache": "^1.0" "doctrine/cache": "^1.0"
}, },
"require-dev": { "require-dev": {
"phpcq/all-tasks": "^1.2" "phpcq/all-tasks": "^1.2",
"contao/manager-plugin": "^2.1"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -51,12 +52,8 @@
"dev-develop": "2.1.x-dev", "dev-develop": "2.1.x-dev",
"dev-release/3.0.0": "3.0.x-dev" "dev-release/3.0.0": "3.0.x-dev"
}, },
"contao-manager-plugin": "Netzmacht\\Contao\\Leaflet\\ContaoManager\\Plugin",
"contao": { "contao": {
"sources": {
"module": "system/modules/leaflet",
"assets/maps": "assets/leaflet/maps",
"assets/js": "assets/leaflet/js"
},
"transifex": { "transifex": {
"project": "contao-leaflet-maps", "project": "contao-leaflet-maps",
"prefix": "core-", "prefix": "core-",

View File

@@ -0,0 +1,40 @@
<?php
/**
* Leaflet maps for Contao CMS.
*
* @package contao-leaflet-maps
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2016-2017 netzmacht David Molineus. All rights reserved.
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
* @filesource
*/
namespace Netzmacht\Contao\Leaflet\ContaoManager;
use Contao\CoreBundle\ContaoCoreBundle;
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use Netzmacht\Contao\Leaflet\NetzmachtContaoLeafletBundle;
use Netzmacht\Contao\Toolkit\NetzmachtContaoToolkitBundle;
/**
* Contao manager plugin.
*
* @package Netzmacht\Contao\Leaflet\ContaoManager
*/
class Plugin implements BundlePluginInterface
{
/**
* {@inheritdoc}
*/
public function getBundles(ParserInterface $parser)
{
return [
BundleConfig::create(NetzmachtContaoLeafletBundle::class)
->setLoadAfter([ContaoCoreBundle::class, NetzmachtContaoToolkitBundle::class])
->setReplace(['leaflet'])
];
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Leaflet maps for Contao CMS.
*
* @package contao-leaflet-maps
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2016-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;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class NetzmachtContaoLeafletBundle.
*
* @package Netzmacht\Contao\Leaflet
*/
class NetzmachtContaoLeafletBundle extends Bundle
{
}