2014-12-27 22:58:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
2015-01-12 19:03:29 +01:00
|
|
|
/**
|
2017-10-05 15:45:43 +02:00
|
|
|
* Leaflet maps for Contao CMS.
|
|
|
|
|
*
|
2016-10-11 10:40:15 +02:00
|
|
|
* @package contao-leaflet-maps
|
2015-01-12 19:03:29 +01:00
|
|
|
* @author David Molineus <david.molineus@netzmacht.de>
|
2017-10-05 15:45:43 +02:00
|
|
|
* @copyright 2016-2017 netzmacht David Molineus. All rights reserved.
|
|
|
|
|
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
2015-01-12 19:03:29 +01:00
|
|
|
* @filesource
|
|
|
|
|
*/
|
|
|
|
|
|
2017-10-06 15:04:04 +02:00
|
|
|
use Netzmacht\Contao\Toolkit\Component\ContentElement\ContentElementDecorator;
|
|
|
|
|
use Netzmacht\Contao\Toolkit\Component\Module\ModuleDecorator;
|
|
|
|
|
|
2014-12-29 12:17:40 +01:00
|
|
|
/*
|
|
|
|
|
* Backend module.
|
|
|
|
|
*/
|
2017-10-05 16:14:46 +02:00
|
|
|
|
2015-01-09 11:53:58 +01:00
|
|
|
array_insert(
|
|
|
|
|
$GLOBALS['BE_MOD'],
|
|
|
|
|
1,
|
|
|
|
|
array(
|
|
|
|
|
'leaflet' => array
|
|
|
|
|
(
|
|
|
|
|
'leaflet_map' => array
|
|
|
|
|
(
|
|
|
|
|
'tables' => array
|
|
|
|
|
(
|
|
|
|
|
'tl_leaflet_map',
|
|
|
|
|
'tl_leaflet_control',
|
|
|
|
|
),
|
2015-01-09 15:24:34 +01:00
|
|
|
'icon' => 'system/modules/leaflet/assets/img/map.png',
|
2015-01-09 11:53:58 +01:00
|
|
|
'stylesheet' => 'system/modules/leaflet/assets/css/backend.css',
|
|
|
|
|
),
|
|
|
|
|
'leaflet_layer' => array
|
|
|
|
|
(
|
|
|
|
|
'tables' => array
|
|
|
|
|
(
|
|
|
|
|
'tl_leaflet_layer',
|
|
|
|
|
'tl_leaflet_marker',
|
|
|
|
|
'tl_leaflet_vector',
|
|
|
|
|
'tl_leaflet_icon',
|
|
|
|
|
'tl_leaflet_style',
|
2015-01-27 17:14:58 +01:00
|
|
|
'tl_leaflet_popup',
|
2015-01-09 11:53:58 +01:00
|
|
|
),
|
|
|
|
|
'icon' => 'system/modules/leaflet/assets/img/layers.png',
|
|
|
|
|
'stylesheet' => 'system/modules/leaflet/assets/css/backend.css',
|
2015-01-09 20:57:19 +01:00
|
|
|
),
|
2015-01-19 09:54:33 +01:00
|
|
|
'leaflet_about' => array
|
2015-01-09 20:57:19 +01:00
|
|
|
(
|
2015-01-19 09:54:33 +01:00
|
|
|
'callback' => 'Netzmacht\Contao\Leaflet\Backend\About',
|
|
|
|
|
'icon' => 'system/modules/leaflet/assets/img/about.png',
|
|
|
|
|
'stylesheet' => 'system/modules/leaflet/assets/css/about.css',
|
2015-01-09 11:53:58 +01:00
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
)
|
2014-12-29 12:17:40 +01:00
|
|
|
);
|
|
|
|
|
|
2015-01-27 17:14:58 +01:00
|
|
|
|
2014-12-29 12:17:40 +01:00
|
|
|
/*
|
|
|
|
|
* Content elements.
|
|
|
|
|
*/
|
2017-10-05 16:14:46 +02:00
|
|
|
|
2017-10-06 15:04:04 +02:00
|
|
|
$GLOBALS['TL_CTE']['includes']['leaflet'] = ContentElementDecorator::class;
|
2014-12-29 12:17:40 +01:00
|
|
|
|
2015-01-27 17:14:58 +01:00
|
|
|
|
2015-01-09 23:20:07 +01:00
|
|
|
/*
|
|
|
|
|
* Frontend modules
|
|
|
|
|
*/
|
2017-10-05 16:14:46 +02:00
|
|
|
|
2017-10-06 15:04:04 +02:00
|
|
|
$GLOBALS['FE_MOD']['includes']['leaflet'] = ModuleDecorator::class;
|
2015-01-09 23:20:07 +01:00
|
|
|
|
2015-01-27 17:14:58 +01:00
|
|
|
|
2014-12-29 12:17:40 +01:00
|
|
|
/*
|
|
|
|
|
* Models.
|
|
|
|
|
*/
|
2017-10-05 16:14:46 +02:00
|
|
|
|
2017-10-06 15:04:04 +02:00
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_control'] = \Netzmacht\Contao\Leaflet\Model\ControlModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_icon'] = \Netzmacht\Contao\Leaflet\Model\IconModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = \Netzmacht\Contao\Leaflet\Model\LayerModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_map'] = \Netzmacht\Contao\Leaflet\Model\MapModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_marker'] = \Netzmacht\Contao\Leaflet\Model\MarkerModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_popup'] = \Netzmacht\Contao\Leaflet\Model\PopupModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_style'] = \Netzmacht\Contao\Leaflet\Model\StyleModel::class;
|
|
|
|
|
$GLOBALS['TL_MODELS']['tl_leaflet_vector'] = \Netzmacht\Contao\Leaflet\Model\VectorModel::class;
|