mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 19:13:55 +01:00
Allow empty standard layers.
This commit is contained in:
@@ -15,6 +15,7 @@ declare(strict_types=1);
|
||||
namespace Netzmacht\Contao\Leaflet\Listener\Dca;
|
||||
|
||||
use Contao\DataContainer;
|
||||
use Contao\StringUtil;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Listener\AbstractListener;
|
||||
@@ -88,7 +89,7 @@ class MapDcaListener extends AbstractListener
|
||||
*/
|
||||
public function saveLayerRelations($layerId, $dataContainer)
|
||||
{
|
||||
$new = deserialize($layerId, true);
|
||||
$new = array_filter(StringUtil::deserialize($layerId, true));
|
||||
$values = array();
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_leaflet_map_layer WHERE mid=:mid order BY sorting');
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'inputType' => 'select',
|
||||
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.map', 'getLayers'],
|
||||
'eval' => array(
|
||||
'mandatory' => true,
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
'chosen' => true,
|
||||
'includeBlankOption' => true,
|
||||
|
||||
Reference in New Issue
Block a user