<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_style'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'sql' => array('keys' => array('id' => 'primary', 'alias' => 'unique')), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('title'), 'flag' => 1, 'panelLayout' => 'limit', 'headerFields' => array('title', 'type')), 'label' => array('fields' => array('title', 'type'), 'format' => '%s <span class="tl_gray">[%s]</span>'), 'global_operations' => array('layers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'], 'href' => 'table=tl_leaflet_layer', 'icon' => 'system/modules/leaflet/assets/img/layers.png', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'), 'icons' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'], 'href' => 'table=tl_leaflet_icon', 'icon' => 'system/modules/leaflet/assets/img/icons.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'popups' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'], 'href' => 'table=tl_leaflet_popup', 'icon' => 'system/modules/leaflet/assets/img/popup.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_style', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('title' => array('title', 'alias', 'type'), 'config' => array(), 'active' => array('active')), 'fixed extends default' => array('config' => array('stroke', 'fill'))), 'metasubpalettes' => array('stroke' => array('color', 'weight', 'opacity', 'dashArray', 'lineCap', 'lineJoin'), 'fill' => array('fillColor', 'fillOpacity')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['title'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['alias'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_style', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['type'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true), 'options' => &$GLOBALS['LEAFLET_STYLES'], 'reference' => &$GLOBALS['TL_LANG']['leaflet_style'], 'sql' => "varchar(32) NOT NULL default ''"), 'stroke' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['stroke'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default '1'"), 'color' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['color'], 'exclude' => true, 'inputType' => 'text', 'wizard' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::colorPicker()), 'eval' => array('tl_class' => 'w50 wizard clr', 'maxlength' => 7, 'decodeEntities' => true), 'sql' => "varchar(8) NOT NULL default ''"), 'weight' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['weight'], 'exclude' => true, 'inputType' => 'text', 'default' => 5, 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(4) NOT NULL default '5'"), 'opacity' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity'], 'exclude' => true, 'inputType' => 'text', 'default' => '0.5', 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(4) NOT NULL default '0.5'"), 'fill' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fill'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'clr w50', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'fillColor' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillColor'], 'exclude' => true, 'inputType' => 'text', 'wizard' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::colorPicker()), 'eval' => array('tl_class' => 'clr w50 wizard', 'maxlength' => 7, 'decodeEntities' => true), 'sql' => "varchar(8) NOT NULL default ''"), 'fillOpacity' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillOpacity'], 'exclude' => true, 'inputType' => 'text', 'default' => '0.2', 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "varchar(4) NOT NULL default '0.2'"), 'dashArray' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['dashArray'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 32, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'lineCap' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCap'], 'exclude' => true, 'inputType' => 'select', 'options' => array('butt', 'round', 'square', 'inherit'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCaps'], 'eval' => array('mandatory' => false, 'tl_class' => 'w50 clr', 'includeBlankOption' => true, 'helpwizard'), 'sql' => "varchar(8) NOT NULL default ''"), 'lineJoin' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoin'], 'exclude' => true, 'inputType' => 'select', 'options' => array('miter', 'round', 'bevel', 'inherit'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoins'], 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'includeBlankOption' => true, 'helpwizard'), 'sql' => "varchar(8) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'sorting' => true, 'search' => false, 'flag' => 12, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')])));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_map'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'ctable' => array('tl_leaflet_control'), 'sql' => array('keys' => array('id' => 'primary', 'alias' => 'unique')), 'onload_callback' => array(function () {
    \Controller::loadLanguageFile('leaflet');
}), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('title'), 'panelLayout' => 'search,limit', 'flag' => 1), 'label' => array('fields' => array('title', 'alias'), 'format' => '%s <span class="tl_gray">[%s]</span>'), 'global_operations' => array('all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['edit'], 'href' => 'act=edit', 'icon' => 'header.gif'), 'controls' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'], 'href' => 'table=tl_leaflet_control', 'icon' => 'system/modules/leaflet/assets/img/control.png', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'metapalettes' => array('default' => array('title' => array('title', 'alias'), 'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad', 'boundsPadding'), 'locate' => array('locate'), 'layers' => array('layers'), 'interaction' => array('dragging', 'touchZoom', 'scrollWheelZoom', 'doubleClickZoom', 'boxZoom', 'tap', 'keyboard'), 'behaviour' => array('zoomControl', 'trackResize', 'closeOnClick', 'bounceAtZoomLimits'), 'expert' => array('options', 'cache'))), 'metasubpalettes' => array('keyboard' => array('keyboardPanOffset', 'keyboardZoomOffset'), 'adjustZoomExtra' => array('minZoom', 'maxZoom', 'zoomSnap', 'zoomDelta'), 'locate' => array(':hide', 'locateWatch', 'locateSetView', 'locateMaxZoom', 'locateTimeout', 'locateMaximumAge', 'enableHighAccuracy'), 'cache' => array('cacheLifeTime')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['title'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['alias'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_map', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'center' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['center'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')), 'wizard' => array(Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getGeocoder')), 'eval' => array('maxlength' => 255, 'tl_class' => 'long clr', 'nullIfEmpty' => true), 'sql' => "varchar(255) NULL"), 'layers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['layers'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'load_callback' => array(\Netzmacht\Contao\Leaflet\Dca\MapCallbacks::callback('loadLayerRelations')), 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\MapCallbacks::callback('saveLayerRelations')), 'eval' => array('multiple' => true, 'doNotSaveEmpty' => true, 'columnFields' => array('reference' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['reference'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\MapCallbacks::callback('getLayers'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true, 'style' => 'width: 300px'), 'sql' => "int(10) unsigned NOT NULL default '0'")), 'flatArray' => true), 'sql' => "mediumblob NULL"), 'zoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'default' => '', 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'adjustZoomExtra' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'minZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'zoomSnap' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "varchar(4) NULL"), 'zoomDelta' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "varchar(4) NULL"), 'dragging' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dragging'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'touchZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['touchZoom'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'scrollWheelZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom'], 'exclude' => true, 'inputType' => 'select', 'options' => array('1', 'center'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'], 'default' => true, 'eval' => array('tl_class' => 'w50', 'helpwizard' => true, 'includeBlankOption' => true, 'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0]), 'sql' => "char(6) NOT NULL default ''"), 'doubleClickZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom'], 'exclude' => true, 'inputType' => 'select', 'options' => array('1', 'center'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'], 'default' => true, 'eval' => array('tl_class' => 'w50', 'helpwizard' => true, 'includeBlankOption' => true, 'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0]), 'sql' => "char(6) NOT NULL default ''"), 'boxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boxZoom'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'tap' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['tap'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'trackResize' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['trackResize'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default '1'"), 'bounceAtZoomLimits' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['bounceAtZoomLimits'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default '1'"), 'closeOnClick' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['closeOnClick'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default '1'"), 'keyboard' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboard'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'keyboardPanOffset' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardPanOffset'], 'exclude' => true, 'inputType' => 'text', 'default' => 80, 'eval' => array('mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50'), 'sql' => "int(4) NOT NULL default '80'"), 'keyboardZoomOffset' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['keyboardZoomOffset'], 'exclude' => true, 'inputType' => 'text', 'default' => 1, 'eval' => array('mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(4) NOT NULL default '1'"), 'zoomControl' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomControl'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default '1'"), 'options' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['options'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('tl_class' => 'clr lng', 'allowHtml' => true, 'style' => 'min-height: 40px;', 'rte' => 'ace|json'), 'sql' => "text NULL"), 'adjustBounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'options' => array('load', 'deferred'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions'], 'eval' => array('tl_class' => 'clr w50', 'multiple' => true, 'helpwizard' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'dynamicLoad' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'clr w50', 'submitOnChange' => false), 'sql' => "char(1) NOT NULL default ''"), 'boundsPadding' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 32, 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "varchar(32) NULL"), 'locate' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locate'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'locateWatch' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateWatch'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'locateSetView' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateSetView'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false), 'sql' => "char(1) NOT NULL default ''"), 'locateTimeout' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateTimeout'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(9) NULL"), 'locateMaximumAge' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaximumAge'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(9) NULL"), 'enableHighAccuracy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['enableHighAccuracy'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'locateMaxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaxZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'cache' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cache'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'cacheLifeTime' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(9) NOT NULL default '0'")));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_layer'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'ctable' => array('tl_leaflet_vector', 'tl_leaflet_marker'), 'ondelete_callback' => array(\Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('deleteRelations')), 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index', 'alias' => 'unique')), 'onload_callback' => array(function () {
    \Controller::loadLanguageFile('leaflet');
}), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 5, 'fields' => array('title'), 'flag' => 1, 'icon' => 'system/modules/leaflet/assets/img/layers.png', 'panelLayout' => 'filter;search,limit', 'paste_button_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getPasteButtons')), 'label' => array('fields' => array('title'), 'format' => '%s', 'label_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('generateRow')), 'global_operations' => array('styles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'], 'href' => 'table=tl_leaflet_style', 'icon' => 'system/modules/leaflet/assets/img/style.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'icons' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'], 'href' => 'table=tl_leaflet_icon', 'icon' => 'system/modules/leaflet/assets/img/icons.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'popups' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'], 'href' => 'table=tl_leaflet_popup', 'icon' => 'system/modules/leaflet/assets/img/popup.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();"')), 'operations' => array('markers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['markers'], 'href' => 'table=tl_leaflet_marker', 'icon' => 'edit.gif', 'button_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('generateMarkersButton')), 'vectors' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['vectors'], 'href' => 'table=tl_leaflet_vector', 'icon' => 'edit.gif', 'button_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('generateVectorsButton')), 'edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['edit'], 'href' => 'act=edit', 'icon' => 'header.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'cut' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cut'], 'href' => 'act=paste&amp;mode=cut', 'icon' => 'cut.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_layer', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('title' => array('title', 'alias', 'type'), 'config' => array(), 'style' => array(), 'expert' => array(':hide'), 'active' => array('active')), 'markers extends default' => array('+expert' => array('pointToLayer'), '+config' => array('boundsMode', 'deferred')), 'group extends default' => array('+title' => array('groupType'), '+active' => array('boundsMode')), 'vectors extends default' => array('+expert' => array('onEachFeature', 'pointToLayer'), '+config' => array('boundsMode', 'deferred')), 'reference extends default' => array('+title' => array('reference', 'standalone')), 'markercluster extends default' => array('config' => array('showCoverageOnHover', 'zoomToBoundsOnClick', 'removeOutsideVisibleBounds', 'animateAddingMarkers', 'spiderfyOnMaxZoom', 'disableClusteringAtZoom', 'maxClusterRadius', 'singleMarkerMode'), '+expert' => array('polygonOptions', 'iconCreateFunction', 'disableDefaultStyle')), 'tile extends default' => array('config' => array('tileUrl', 'subdomains', 'attribution', 'minZoom', 'maxZoom'), '+expert' => array('errorTileUrl', 'tileSize', 'tms', 'continuousWorld', 'noWrap', 'zoomReverse', 'zoomOffset', 'maxNativeZoom', 'opacity', 'zIndex', 'unloadvisibleTiles', 'updateWhenIdle', 'detectRetina', 'reuseTiles', 'bounds')), 'overpass extends default' => array('config' => array('overpassQuery', 'boundsMode', 'minZoom', 'overpassEndpoint', 'overpassPopup'), 'style' => array('amenityIcons'), '+expert' => array('onEachFeature', 'pointToLayer'))), 'metasubselectpalettes' => array('type' => array('provider' => array('tile_provider', 'tile_provider_variant')), 'tile_provider' => array('MapBox' => array('tile_provider_key'), 'HERE' => array('tile_provider_key', 'tile_provider_code'))), 'metasubpalettes' => array('spiderfyOnMaxZoom' => array('spiderfyDistanceMultiplier'), 'deferred' => array('cache'), 'cache' => array('cacheLifeTime')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['title'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_layer', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'], 'exclude' => true, 'inputType' => 'select', 'filter' => true, 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true, 'helpwizard' => true), 'options' => array_keys($GLOBALS['LEAFLET_LAYERS']), 'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'], 'sql' => "varchar(32) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'tile_provider' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => true, 'tl_class' => 'w50 clr', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true), 'options' => array_keys($GLOBALS['LEAFLET_TILE_PROVIDERS']), 'sql' => "varchar(32) NOT NULL default ''"), 'tile_provider_variant' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'submitOnChange' => true, 'chosen' => false), 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getVariants'), 'sql' => "varchar(32) NOT NULL default ''"), 'tile_provider_key' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'tile_provider_code' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'deferred' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['deferred'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'groupType' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupType'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'submitOnChange' => true, 'helpwizard' => true), 'default' => 'layer', 'options' => array('layer', 'feature'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes'], 'sql' => "varchar(32) NOT NULL default ''"), 'reference' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getLayers'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'standalone' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'onEachFeature' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['onEachFeature'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'pointToLayer' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['pointToLayer'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'showCoverageOnHover' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['showCoverageOnHover'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'zoomToBoundsOnClick' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomToBoundsOnClick'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'spiderfyOnMaxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['spiderfyOnMaxZoom'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'removeOutsideVisibleBounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['removeOutsideVisibleBounds'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default '1'"), 'animateAddingMarkers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['animateAddingMarkers'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'disableClusteringAtZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['disableClusteringAtZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'default' => '', 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxClusterRadius' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxClusterRadius'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'singleMarkerMode' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['singleMarkerMode'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'polygonOptions' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['polygonOptions'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|json', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'spiderfyDistanceMultiplier' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['spiderfyDistanceMultiplier'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'iconCreateFunction' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'disableDefaultStyle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['disableDefaultStyle'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true), 'sql' => "char(1) NOT NULL default ''"), 'boundsMode' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['boundsMode'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getBoundsModes'), 'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true), 'sql' => "varchar(6) NOT NULL default ''"), 'tileUrl' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tileUrl'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'mandatory' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'minZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'maxNativeZoom' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['maxNativeZoom'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getZoomLevels'), 'eval' => array('maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50', 'includeBlankOption' => true, 'nullIfEmpty' => true), 'sql' => "int(4) NULL"), 'tileSize' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tileSize'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'subdomains' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['subdomains'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 16, 'tl_class' => 'w50'), 'sql' => "varchar(16) NOT NULL default ''"), 'errorTileUrl' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['errorTileUrl'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'attribution' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['attribution'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('maxlength' => 255, 'tl_class' => 'long', 'allowHtml' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'tms' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tms'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'continuousWorld' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['continuousWorld'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'noWrap' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['noWrap'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'zoomOffset' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomOffset'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'zoomReverse' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zoomReverse'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'opacity' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['opacity'], 'exclude' => true, 'inputType' => 'text', 'default' => '1.0', 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50 clr'), 'sql' => "varchar(4) NOT NULL default ''"), 'zIndex' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['zIndex'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'unloadvisibleTiles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['unloadvisibleTiles'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'updateWhenIdle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['updateWhenIdle'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'detectRetina' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['detectRetina'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'reuseTiles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['reuseTiles'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'bounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['bounds'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(), 'eval' => array('maxlength' => 255, 'multiple' => true, 'size' => 2, 'tl_class' => 'long clr', 'nullIfEmpty' => true), 'sql' => "mediumblob NULL"), 'cache' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cache'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'cacheLifeTime' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'overpassQuery' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassQuery'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'overpassEndpoint' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'overpassCallback' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassCallback'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'minZoomIndicatorPosition' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorPosition'], 'exclude' => true, 'inputType' => 'select', 'filter' => true, 'sorting' => true, 'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_layer'], 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'minZoomIndicatorMessage' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessage'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('tl_class' => 'clr w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'minZoomIndicatorMessageNoLayer' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessageNoLayer'], 'exclude' => true, 'inputType' => 'text', 'default' => '', 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'debug' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['debug'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'amenityIcons' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcons'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'getIcons'), 'eval' => array('columnFields' => array('amenity' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenity'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\LayerCallbacks::callback('getAmenities'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'style' => 'width: 200px', 'chosen' => true)), 'icon' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'getIcons'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'style' => 'width: 200px', 'chosen' => true)))), 'sql' => "blob NULL"), 'overpassPopup' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassPopup'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|javascript', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL")));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_vector'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'ptable' => 'tl_leaflet_layer', 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index', 'alias' => 'unique')), 'onload_callback' => array(function () {
    \Controller::loadLanguageFile('leaflet');
}), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 4, 'fields' => array('sorting'), 'flag' => 1, 'panelLayout' => 'sort,filter;search,limit', 'headerFields' => array('title', 'type'), 'child_record_callback' => Netzmacht\Contao\Leaflet\Dca\VectorCallbacks::callback('generateRow')), 'label' => array('fields' => array('title'), 'format' => '%s'), 'global_operations' => array('styles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['styles'], 'href' => 'table=tl_leaflet_style', 'icon' => 'system/modules/leaflet/assets/img/style.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'popups' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popups'], 'href' => 'table=tl_leaflet_popup', 'icon' => 'system/modules/leaflet/assets/img/popup.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'cut' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['cut'], 'href' => 'act=paste&amp;mode=cut', 'icon' => 'cut.gif', 'attributes' => 'onclick="Backend.getScrollOffset()"'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_vector', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('title' => array('title', 'alias', 'type'), 'data' => array(), 'popup' => array(':hide', 'addPopup'), 'config' => array(':hide', 'style', 'className', 'clickable'), 'expert' => array(':hide', 'featureData'), 'active' => array('active', 'ignoreForBounds')), 'polyline extends default' => array('+config' => array('smoothFactor', 'noClip'), 'data' => array('data')), 'multiPolyline extends polyline' => array('data' => array('multiData')), 'polygon extends polyline' => array(), 'multiPolygon extends multiPolyline' => array(), 'rectangle extends polygon' => array('data' => array('bounds')), 'circle extends default' => array('+data' => array('coordinates', 'radius')), 'circleMarker extends circle' => array()), 'metasubpalettes' => array('addPopup' => array('popup', 'popupContent')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'", 'sorting' => true), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['title'], 'exclude' => true, 'inputType' => 'text', 'filter' => false, 'sorting' => true, 'search' => true, 'flag' => 1, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['alias'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_vector', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['type'], 'exclude' => true, 'inputType' => 'select', 'filter' => true, 'sorting' => true, 'search' => false, 'flag' => 1, 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true, 'helpwizard' => true), 'options' => &$GLOBALS['LEAFLET_VECTORS'], 'reference' => &$GLOBALS['TL_LANG']['leaflet_vector'], 'sql' => "varchar(32) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'sorting' => true, 'search' => false, 'flag' => 12, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'addPopup' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['addPopup'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'popup' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popup'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'getPopups'), 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'popupContent' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popupContent'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'), 'explanation' => 'insertTags', 'sql' => "mediumtext NULL"), 'style' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => Netzmacht\Contao\Leaflet\Dca\VectorCallbacks::callback('getStyles'), 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'clickable' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['clickable'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'm12 w50'), 'sql' => "char(1) NOT NULL default ''"), 'className' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['className'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'coordinates' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['coordinates'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')), 'wizard' => array(Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getGeocoder')), 'eval' => array('maxlength' => 255, 'tl_class' => 'long clr', 'nullIfEmpty' => true, 'mandatory' => true), 'sql' => "varchar(255) NULL"), 'radius' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['radius'], 'exclude' => true, 'inputType' => 'text', 'default' => 5, 'eval' => array('mandatory' => false, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'clr w50'), 'sql' => "int(10) NOT NULL default '5'"), 'data' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'], 'inputType' => 'textarea', 'search' => false, 'eval' => array('mandatory' => true, 'alwaysSave' => true), 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinates')), 'sql' => "longblob NULL"), 'multiData' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData'], 'inputType' => 'multiColumnWizard', 'search' => false, 'eval' => array('mandatory' => true, 'alwaysSave' => true, 'flatArray' => true, 'columnFields' => array('data' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'], 'inputType' => 'textarea', 'search' => false, 'eval' => array('alwaysSave' => true, 'style' => 'width:600px')))), 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateMultipleCoordinateSets')), 'sql' => "longblob NULL"), 'bounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(), 'eval' => array('maxlength' => 255, 'multiple' => true, 'size' => 2, 'tl_class' => 'long clr', 'nullIfEmpty' => true), 'sql' => "mediumblob NULL"), 'ignoreForBounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['ignoreForBounds'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'featureData' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['featureData'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('tl_class' => 'clr lng', 'allowHtml' => true, 'style' => 'min-height: 40px;', 'rte' => 'ace|json'), 'sql' => "text NULL")));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_marker'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'ptable' => 'tl_leaflet_layer', 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index', 'alias' => 'unique')), 'onload_callback' => array(function () {
    \Controller::loadLanguageFile('leaflet');
}), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 4, 'fields' => array('sorting'), 'flag' => 1, 'panelLayout' => 'sort,filter;search,limit', 'headerFields' => array('title', 'type'), 'child_record_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'generateRow')), 'label' => array('fields' => array('title'), 'format' => '%s'), 'global_operations' => array('icons' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'], 'href' => 'table=tl_leaflet_icon&id=', 'icon' => 'system/modules/leaflet/assets/img/icons.png', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'), 'popups' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups'], 'href' => 'table=tl_leaflet_popup', 'icon' => 'system/modules/leaflet/assets/img/popup.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_marker', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'metapalettes' => array('default' => array('title' => array('title', 'alias', 'coordinates'), 'content' => array('tooltip', 'alt', 'addPopup'), 'config' => array(':hide', 'clickable', 'draggable', 'keyboard', 'zIndexOffset', 'opacity', 'riseOnHover', 'riseOffset', 'customIcon'), 'expert' => array(':hide', 'featureData'), 'active' => array('active', 'ignoreForBounds'))), 'metasubpalettes' => array('addPopup' => array('popup', 'popupContent'), 'customIcon' => array('icon')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'", 'sorting' => true), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['title'], 'exclude' => true, 'search' => true, 'sorting' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_marker', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'coordinates' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates'), array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'saveCoordinates')), 'load_callback' => array(array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'loadCoordinates')), 'wizard' => array(Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('getGeocoder')), 'eval' => array('maxlength' => 255, 'tl_class' => 'long clr', 'nullIfEmpty' => true, 'doNotSaveEmpty' => true)), 'latitude' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['latitude'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "decimal(10,8) NULL"), 'longitude' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['longitude'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "decimal(11,8) NULL"), 'altitude' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['altitude'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "float NULL"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'], 'exclude' => true, 'filter' => true, 'sorting' => true, 'flag' => 12, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'tooltip' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['tooltip'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alt' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'addPopup' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'popup' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'getPopups'), 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'popupContent' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'), 'explanation' => 'insertTags', 'sql' => "mediumtext NULL"), 'customIcon' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'clr w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'icon' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\Leaflet\\Dca\\MarkerCallbacks', 'getIcons'), 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'chosen' => true), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'draggable' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'clickable' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'keyboard' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'zIndexOffset' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['zIndexOffset'], 'exclude' => true, 'inputType' => 'text', 'default' => 0, 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true), 'sql' => "int(5) NULL"), 'ignoreForBounds' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['ignoreForBounds'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'featureData' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['featureData'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('tl_class' => 'clr lng', 'allowHtml' => true, 'style' => 'min-height: 40px;', 'rte' => 'ace|json'), 'sql' => "text NULL")));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_popup'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'sql' => array('keys' => array('id' => 'primary', 'alias' => 'unique')), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('title'), 'flag' => 1, 'panelLayout' => 'limit', 'headerFields' => array('title', 'type')), 'label' => array('fields' => array('title', 'type'), 'format' => '%s <span class="tl_gray">[%s]</span>'), 'global_operations' => array('layers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'], 'href' => 'table=tl_leaflet_layer', 'icon' => 'system/modules/leaflet/assets/img/layers.png', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'), 'styles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'], 'href' => 'table=tl_leaflet_style', 'icon' => 'system/modules/leaflet/assets/img/style.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'icons' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'], 'href' => 'table=tl_leaflet_icon', 'icon' => 'system/modules/leaflet/assets/img/icons.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_popup', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('title' => array('title', 'alias'), 'size' => array('maxWidth', 'minWidth', 'maxHeight'), 'config' => array(':hide', 'closeButton', 'keepInView', 'closeOnClick', 'zoomAnimation', 'offset', 'className', 'autoPan'), 'active' => array('active'))), 'metasubpalettes' => array('autoPan' => array('autoPanPadding')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['title'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_popup', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'maxWidth' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxWidth'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(4) NULL"), 'minWidth' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['minWidth'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(4) NULL"), 'maxHeight' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['maxHeight'], 'exclude' => true, 'inputType' => 'text', 'default' => null, 'eval' => array('mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'), 'sql' => "int(4) NULL"), 'autoPan' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPan'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default '1'"), 'keepInView' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => false, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false), 'sql' => "char(1) NOT NULL default ''"), 'closeButton' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeButton'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false), 'sql' => "char(1) NOT NULL default '1'"), 'offset' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')), 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(255) NULL"), 'autoPanPadding' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true, 'multiple' => true, 'size' => 2), 'sql' => "varchar(255) NULL"), 'zoomAnimation' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['zoomAnimation'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false), 'sql' => "char(1) NOT NULL default '1'"), 'closeOnClick' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['closeOnClick'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50', 'submitOnChange' => false), 'sql' => "char(1) NOT NULL default '1'"), 'className' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['className'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'sorting' => true, 'search' => false, 'flag' => 12, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')])));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
\Controller::loadLanguageFile('leaflet');
$GLOBALS['TL_DCA']['tl_leaflet_control'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'ptable' => 'tl_leaflet_map', 'sql' => array('keys' => array('id' => 'primary', 'pid' => 'index')), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 4, 'fields' => array('sorting'), 'headerFields' => array('title'), 'flag' => 1, 'sorting' => 2, 'panelLayout' => 'filter,sort;search,limit', 'child_record_callback' => \Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('generateRow')), 'label' => array('fields' => array('title'), 'format' => '%s'), 'global_operations' => array('all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['edit'], 'href' => 'act=edit', 'icon' => 'header.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_control', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('name' => array('title', 'alias', 'type', 'position'), 'config' => array(), 'active' => array('active')), 'zoom extends default' => array('config' => array('zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle')), 'layers extends default' => array('config' => array('layers', 'collapsed', 'autoZIndex')), 'scale extends default' => array('config' => array('maxWidth', 'metric', 'imperial', 'updateWhenIdle')), 'attribution extends default' => array('config' => array('attributions', 'prefix', 'disableDefault')), 'loading extends default' => array('config' => array('separate', 'zoomControl', 'spinjs')), 'fullscreen extends default' => array('config' => array('buttonTitle', 'separate', 'simulateFullScreen'))), 'metasubpalettes' => array('spinjs' => array('spin')), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'", 'sorting' => true), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['title'], 'exclude' => true, 'inputType' => 'text', 'sorting' => true, 'search' => true, 'flag' => 1, 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'], 'exclude' => true, 'inputType' => 'text', 'search' => true, 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_control', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::PARENT_ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(255) NULL"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['type'], 'exclude' => true, 'inputType' => 'select', 'filter' => true, 'sorting' => true, 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true, 'helpwizard' => true), 'options' => $GLOBALS['LEAFLET_CONTROLS'], 'reference' => &$GLOBALS['TL_LANG']['leaflet_control'], 'sql' => "varchar(32) NOT NULL default ''"), 'position' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['position'], 'exclude' => true, 'inputType' => 'select', 'filter' => true, 'sorting' => true, 'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'], 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'filter' => true, 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'zoomInText' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'zoomOutText' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'zoomInTitle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'zoomOutTitle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'collapsed' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['collapsed'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => '1', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'autoZIndex' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => '1', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'layers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'load_callback' => array(\Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('loadLayerRelations')), 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('saveLayerRelations')), 'eval' => array('tl_class' => 'clr', 'columnFields' => array('layer' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('getLayers'), 'eval' => array('style' => 'width: 300px', 'chosen' => true, 'includeBlankOption' => true)), 'mode' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'], 'exclude' => true, 'inputType' => 'select', 'options' => array('base', 'overlay'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'], 'eval' => array('style' => 'width: 200px', 'helpwizard' => true)))), 'sql' => "mediumblob NULL"), 'maxWidth' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['maxWidth'], 'exclude' => true, 'inputType' => 'text', 'default' => 100, 'eval' => array('tl_class' => 'w50', 'rgxp' => 'digit'), 'sql' => "int(5) NOT NULL default '100'"), 'metric' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['metric'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => '1', 'eval' => array('tl_class' => 'w50 clr'), 'sql' => "char(1) NOT NULL default '1'"), 'imperial' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['imperial'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => '1', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default '1'"), 'updateWhenIdle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'prefix' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'attributions' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions'], 'exclude' => true, 'inputType' => 'listWizard', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'clr', 'allowHtml' => true), 'sql' => "mediumblob NULL"), 'separate' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['separate'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'zoomControl' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => \Netzmacht\Contao\Leaflet\Dca\ControlCallbacks::callback('getZoomControls'), 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'], 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'spinjs' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spinjs'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'spin' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spin'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:60px', 'preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|json', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'simulateFullScreen' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['simulateFullScreen'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'buttonTitle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['buttonTitle'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'disableDefault' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['disableDefault'], 'exclude' => true, 'inputType' => 'checkbox', 'default' => true, 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''")));
<?php

/**
 * @package    contao-leaflet-maps
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
$GLOBALS['TL_DCA']['tl_leaflet_icon'] = array('config' => array('dataContainer' => 'Table', 'enableVersioning' => true, 'sql' => array('keys' => array('id' => 'primary', 'alias' => 'unique')), 'onsubmit_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'list' => array('sorting' => array('mode' => 1, 'fields' => array('title'), 'flag' => 1, 'panelLayout' => 'limit', 'headerFields' => array('title', 'type')), 'label' => array('fields' => array('title', 'type'), 'format' => '%s <span class="tl_gray">[%s]</span>'), 'global_operations' => array('layers' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn'], 'href' => 'table=tl_leaflet_layer', 'icon' => 'system/modules/leaflet/assets/img/layers.png', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'), 'styles' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['styles'], 'href' => 'table=tl_leaflet_style', 'icon' => 'system/modules/leaflet/assets/img/style.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'popups' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popups'], 'href' => 'table=tl_leaflet_popup', 'icon' => 'system/modules/leaflet/assets/img/popup.png', 'attributes' => 'onclick="Backend.getScrollOffset();"'), 'all' => array('label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"')), 'operations' => array('edit' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['edit'], 'href' => 'act=edit', 'icon' => 'edit.gif'), 'copy' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['copy'], 'href' => 'act=copy', 'icon' => 'copy.gif'), 'delete' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete'], 'href' => 'act=delete', 'icon' => 'delete.gif', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'), 'toggle' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['toggle'], 'icon' => 'visible.gif', 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', 'button_callback' => \Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::stateButton('tl_leaflet_icon', 'active')), 'show' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['show'], 'href' => 'act=show', 'icon' => 'show.gif'))), 'palettes' => array('__selector__' => array('type')), 'metapalettes' => array('default' => array('title' => array('title', 'alias', 'type')), 'image extends default' => array('config' => array('iconImage', 'iconRetinaImage', 'iconAnchor', 'popupAnchor', 'className'), 'shadow' => array('shadowImage', 'shadowRetinaImage', 'shadowAnchor'), 'active' => array('active')), 'div extends default' => array('config' => array('html', 'iconSize', 'iconAnchor', 'popupAnchor', 'className'), 'active' => array('active')), 'extra extends default' => array('config' => array('icon', 'prefix', 'shape', 'markerColor', 'number', 'iconColor'), 'active' => array('active'))), 'fields' => array('id' => array('sql' => "int(10) unsigned NOT NULL auto_increment"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['title'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator('tl_leaflet_icon', 'alias', ['title'], \Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR), \Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true), 'sql' => "varchar(255) NULL"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['type'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, 'chosen' => true), 'options' => &$GLOBALS['LEAFLET_ICONS'], 'reference' => &$GLOBALS['TL_LANG']['leaflet_icon'], 'sql' => "varchar(32) NOT NULL default ''"), 'active' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['active'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''", 'save_callback' => [\Netzmacht\Contao\Leaflet\Dca\LeafletCallbacks::callback('clearCache')]), 'iconImage' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => true, 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg'), 'sql' => "binary(16) NULL"), 'iconRetinaImage' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconRetinaImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => false, 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg'), 'sql' => "binary(16) NULL"), 'shadowImage' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => false, 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg'), 'sql' => "binary(16) NULL"), 'shadowRetinaImage' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => false, 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg'), 'sql' => "binary(16) NULL"), 'iconAnchor' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconAnchor'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')), 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(255) NULL"), 'shadowAnchor' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowAnchor'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')), 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(255) NULL"), 'popupAnchor' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popupAnchor'], 'exclude' => true, 'inputType' => 'text', 'save_callback' => array(\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates')), 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(255) NULL"), 'className' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['className'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"), 'iconSize' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconSize'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 64, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(64) NULL"), 'html' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['html'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('style' => 'height:60px', 'preserveTags' => true, 'decodeEntities' => true, 'allowHtml' => true, 'rte' => 'ace|html', 'tl_class' => 'clr'), 'sql' => "mediumtext NULL"), 'icon' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 64, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(64) NULL"), 'prefix' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 64, 'tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(64) NULL"), 'shape' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'], 'exclude' => true, 'inputType' => 'select', 'default' => 'circle', 'options' => ['circle', 'square', 'star', 'penta'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NULL"), 'iconColor' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'], 'exclude' => true, 'inputType' => 'text', 'wizard' => array(\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::colorPicker()), 'eval' => array('maxlength' => 64, 'tl_class' => 'w50 wizard', 'nullIfEmpty' => true), 'sql' => "varchar(16) NULL"), 'markerColor' => array('label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'], 'exclude' => true, 'inputType' => 'select', 'default' => 'circle', 'options' => ['blue', 'red', 'orange-dark', 'orange', 'yellow', 'blue-dark', 'cyan', 'purple', 'violet', 'pink', 'green-dark', 'green', 'green-light', 'black', 'white'], 'eval' => array('tl_class' => 'w50', 'nullIfEmpty' => true), 'sql' => "varchar(16) NULL")));