Files
contao-leaflet-maps/src/Frontend/MapModule.php

46 lines
882 B
PHP
Raw Normal View History

<?php
/**
2016-10-11 10:40:15 +02:00
* @package contao-leaflet-maps
* @author David Molineus <david.molineus@netzmacht.de>
2016-10-11 10:40:15 +02:00
* @copyright 2014-2016 netzmacht David Molineus
* @license LGPL 3.0
* @filesource
*
*/
namespace Netzmacht\Contao\Leaflet\Frontend;
2015-01-12 19:03:29 +01:00
/**
* The frontend module for the Leaflet map.
*
* @package Netzmacht\Contao\Leaflet\Frontend
*/
class MapModule extends AbstractMapHybrid
{
2015-01-09 23:20:07 +01:00
/**
* Template name.
*
* @var string
*/
protected $templateName = 'mod_leaflet_map';
2015-01-15 15:30:16 +01:00
/**
* Get the identifier.
*
* @return string
*/
protected function getIdentifier()
{
if ($this->get('leaflet_mapId')) {
return $this->get('leaflet_mapId');
2015-01-30 17:44:24 +01:00
}
if ($this->get('cssID')[0]) {
return 'map_' . $this->get('cssID')[0];
2015-01-30 17:44:24 +01:00
}
return 'map_mod_' . $this->get('id');
}
}