diff --git a/src/Resources/contao/dca/tl_content.php b/src/Resources/contao/dca/tl_content.php
index 1cb40be..77b4fa6 100644
--- a/src/Resources/contao/dca/tl_content.php
+++ b/src/Resources/contao/dca/tl_content.php
@@ -10,76 +10,76 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = array(
- 'type' => array('type', 'headline'),
- 'leaflet' => array('leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'),
- 'templates' => array(':hide', 'customTpl'),
- 'protected' => array(':hide', 'protected'),
- 'expert' => array(':hide', 'guests', 'cssID', 'space'),
- 'invisible' => array(':hide', 'invisible', 'start', 'start')
-);
+$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = [
+ 'type' => ['type', 'headline'],
+ 'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'],
+ 'templates' => [':hide', 'customTpl'],
+ 'protected' => [':hide', 'protected'],
+ 'expert' => [':hide', 'guests', 'cssID', 'space'],
+ 'invisible' => [':hide', 'invisible', 'start', 'start'],
+];
-$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_map'] = array(
+$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_map'] = [
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_map'],
'inputType' => 'select',
'exclude' => true,
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getMaps'],
- 'wizard' => array(
+ 'wizard' => [
['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getEditMapLink'],
- ),
- 'eval' => array(
+ ],
+ 'eval' => [
'tl_class' => 'w50 wizard',
'chosen' => true,
- ),
- 'sql' => "int(10) unsigned NOT NULL default '0'"
-);
+ ],
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+];
-$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_mapId'] = array(
- 'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_mapId'],
- 'inputType' => 'text',
- 'exclude' => true,
- 'eval' => array(
+$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_mapId'] = [
+ 'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_mapId'],
+ 'inputType' => 'text',
+ 'exclude' => true,
+ 'eval' => [
'tl_class' => 'w50',
'chosen' => true,
'maxlength' => 16,
- ),
- 'sql' => "varchar(16) NOT NULL default ''"
-);
+ ],
+ 'sql' => "varchar(16) NOT NULL default ''",
+];
-$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_width'] = array(
+$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_width'] = [
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_width'],
'inputType' => 'inputUnit',
- 'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
+ 'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
'search' => false,
'exclude' => true,
- 'eval' => array('rgxp' => 'digit', 'tl_class' => 'clr w50'),
- 'sql' => "varchar(64) NOT NULL default ''"
-);
+ 'eval' => ['rgxp' => 'digit', 'tl_class' => 'clr w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+];
-$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_height'] = array(
+$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_height'] = [
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_height'],
'inputType' => 'inputUnit',
- 'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
+ 'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
'search' => false,
'exclude' => true,
- 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'),
- 'sql' => "varchar(64) NOT NULL default ''"
-);
+ 'eval' => ['rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+];
-$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = array(
+$GLOBALS['TL_DCA']['tl_content']['fields']['leaflet_template'] = [
'label' => &$GLOBALS['TL_LANG']['tl_content']['leaflet_template'],
'inputType' => 'select',
'exclude' => true,
'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
- 'eval' => array(
+ 'eval' => [
'tl_class' => 'w50',
'chosen' => true,
- ),
- 'toolkit' => [
- 'template_options' => [
- 'prefix' => 'leaflet_map_js'
- ]
],
- 'sql' => "varchar(64) NOT NULL default ''"
-);
+ 'toolkit' => [
+ 'template_options' => [
+ 'prefix' => 'leaflet_map_js',
+ ],
+ ],
+ 'sql' => "varchar(64) NOT NULL default ''",
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_control.php b/src/Resources/contao/dca/tl_leaflet_control.php
index 2499498..c2e594f 100644
--- a/src/Resources/contao/dca/tl_leaflet_control.php
+++ b/src/Resources/contao/dca/tl_leaflet_control.php
@@ -10,448 +10,400 @@
* @filesource
*/
-$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',
- )
- ),
- 'onload_callback' => array(
+$GLOBALS['TL_DCA']['tl_leaflet_control'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'ptable' => 'tl_leaflet_map',
+ 'sql' => [
+ 'keys' => [
+ 'id' => 'primary',
+ 'pid' => 'index',
+ ],
+ ],
+ 'onload_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
- ),
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
+ ],
// List configuration
- '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_maps.listeners.dca.control', '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)"',
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 4,
+ 'fields' => ['sorting'],
+ 'headerFields' => ['title'],
+ 'flag' => 1,
+ 'sorting' => 2,
+ 'panelLayout' => 'filter,sort;search,limit',
+ 'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'generateRow'],
+ ],
+ 'label' => [
+ 'fields' => ['title'],
+ 'format' => '%s',
+ ],
+ 'global_operations' => [
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'header.gif',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'delete' => [
+ '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' => [
+ '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.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
- ),
- 'show' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['show'],
- 'href' => 'act=show',
- 'icon' => 'show.gif'
- )
- )
- ),
+ ],
+ 'show' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['show'],
+ 'href' => 'act=show',
+ 'icon' => 'show.gif',
+ ],
+ ],
+ ],
- 'palettes' => array(
- '__selector__' => array('type')
- ),
+ 'palettes' => [
+ '__selector__' => ['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')
- ),
- ),
+ 'metapalettes' => [
+ 'default' => [
+ 'name' => ['title', 'alias', 'type', 'position'],
+ 'config' => [],
+ 'active' => ['active'],
+ ],
+ 'zoom extends default' => [
+ 'config' => ['zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle'],
+ ],
+ 'layers extends default' => [
+ 'config' => ['layers', 'collapsed', 'autoZIndex'],
+ ],
+ 'scale extends default' => [
+ 'config' => ['maxWidth', 'metric', 'imperial', 'updateWhenIdle'],
+ ],
+ 'attribution extends default' => [
+ 'config' => ['attributions', 'prefix', 'disableDefault'],
+ ],
+ 'loading extends default' => [
+ 'config' => ['separate', 'zoomControl', 'spinjs'],
+ ],
+ 'fullscreen extends default' => [
+ 'config' => ['buttonTitle', 'separate', 'simulateFullScreen'],
+ ],
+ ],
- 'metasubpalettes' => array(
- 'spinjs' => array('spin')
- ),
+ 'metasubpalettes' => [
+ 'spinjs' => ['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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'pid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'sorting' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ 'sorting' => true,
+ ],
+ 'title' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'],
'exclude' => true,
'inputType' => 'text',
'search' => true,
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
- ),
- 'eval' => array(
+ ],
+ 'eval' => [
'mandatory' => false,
'maxlength' => 255,
'tl_class' => 'w50',
'nullIfEmpty' => true,
- ),
- 'toolkit' => [
+ ],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_parent',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
- 'sql' => 'varchar(255) NULL'
- ),
- 'type' => array
- (
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'type' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['type'],
'exclude' => true,
'inputType' => 'select',
'filter' => true,
'sorting' => true,
- 'eval' => array(
+ 'eval' => [
'mandatory' => true,
'tl_class' => 'w50',
'includeBlankOption' => true,
'submitOnChange' => true,
'chosen' => true,
'helpwizard' => true,
- ),
+ ],
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getControlTypes'],
'reference' => &$GLOBALS['TL_LANG']['leaflet_control'],
'sql' => "varchar(32) NOT NULL default ''",
- ),
- 'position' => array
- (
+ ],
+ 'position' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['position'],
'exclude' => true,
'inputType' => 'select',
'filter' => true,
'sorting' => true,
- 'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'),
+ 'options' => ['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 ''",
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'active' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['active'],
+ 'exclude' => true,
+ 'inputType' => 'checkbox',
+ 'filter' => true,
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
- 'zoomInText' => array
- (
+ ],
+ 'zoomInText' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'zoomOutText' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'zoomInTitle' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'zoomOutTitle' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'collapsed' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'autoZIndex' => [
'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(
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'layers' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'],
+ 'exclude' => true,
+ 'inputType' => 'multiColumnWizard',
+ 'load_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.control', 'loadLayerRelations'],
- ),
- 'save_callback' => array(
+ ],
+ 'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.control', 'saveLayerRelations'],
- ),
- 'eval' => array
- (
+ ],
+ 'eval' => [
'tl_class' => 'clr',
- 'columnFields' => array
- (
- 'layer' => array
- (
+ 'columnFields' => [
+ 'layer' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', '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',
+ 'eval' => [
+ 'style' => 'width: 300px',
+ 'chosen' => true,
+ 'includeBlankOption' => true,
+ ],
+ ],
+ 'mode' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'options' => ['base', 'overlay'],
+ 'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
+ 'eval' => [
+ 'style' => 'width: 200px',
'helpwizard' => true,
- ),
- ),
- )
- ),
- 'sql' => 'mediumblob NULL'
- ),
- 'maxWidth' => array
- (
+ ],
+ ],
+ ],
+ ],
+ 'sql' => 'mediumblob NULL',
+ ],
+ 'maxWidth' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'rgxp' => 'digit'],
+ 'sql' => "int(5) NOT NULL default '100'",
+ ],
+ 'metric' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 clr'],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'imperial' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'updateWhenIdle' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'prefix' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'attributions' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'clr', 'allowHtml' => true],
+ 'sql' => 'mediumblob NULL',
+ ],
+ 'separate' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 m12'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'zoomControl' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomControl'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.control', 'getZoomControls'],
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
- 'eval' => array(
+ 'eval' => [
'mandatory' => false,
'tl_class' => 'w50',
'chosen' => true,
- 'includeBlankOption' => true
- ),
- 'sql' => "varchar(255) NOT NULL default ''"
- ),
- 'spinjs' => array
- (
+ 'includeBlankOption' => true,
+ ],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'spinjs' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'spin' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['spin'],
'exclude' => true,
'inputType' => 'textarea',
- 'eval' => array(
+ 'eval' => [
'style' => 'height:60px',
- 'preserveTags' => true,
- 'decodeEntities' => true,
- 'allowHtml' => true,
- 'rte' => 'ace|json',
- 'tl_class' => 'clr'
- ),
- 'sql' => 'mediumtext NULL'
- ),
- 'simulateFullScreen' => array
- (
+ 'preserveTags' => true,
+ 'decodeEntities' => true,
+ 'allowHtml' => true,
+ 'rte' => 'ace|json',
+ 'tl_class' => 'clr',
+ ],
+ 'sql' => 'mediumtext NULL',
+ ],
+ 'simulateFullScreen' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 m12'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'buttonTitle' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'disableDefault' => [
'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 ''"
- ),
- ),
-);
+ 'eval' => ['tl_class' => 'w50 m12'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_control_layer.php b/src/Resources/contao/dca/tl_leaflet_control_layer.php
index d67c65b..e669d64 100644
--- a/src/Resources/contao/dca/tl_leaflet_control_layer.php
+++ b/src/Resources/contao/dca/tl_leaflet_control_layer.php
@@ -10,44 +10,35 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_control_layer'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_control_layer'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'cid,lid' => 'unique',
- )
- )
- ),
+ ],
+ ],
+ ],
- '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'"
- ),
- 'cid' => array
- (
- 'sql' => "int(10) unsigned NOT NULL default '0'"
- ),
- 'lid' => array
- (
- 'sql' => "int(10) unsigned NOT NULL default '0'"
- ),
- 'mode' => array
- (
- 'sql' => "varchar(16) NOT NULL default ''"
- )
- )
-);
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'sorting' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'cid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'lid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'mode' => [
+ 'sql' => "varchar(16) NOT NULL default ''",
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_icon.php b/src/Resources/contao/dca/tl_leaflet_icon.php
index e42238c..f42a10e 100644
--- a/src/Resources/contao/dca/tl_leaflet_icon.php
+++ b/src/Resources/contao/dca/tl_leaflet_icon.php
@@ -10,427 +10,388 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'enableVersioning' => true,
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_icon'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'alias' => 'unique',
- )
- ),
+ ],
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', '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 [%s]',
- ),
- 'global_operations' => array
- (
- 'layers' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn'],
- 'href' => 'table=tl_leaflet_layer',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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' => 'bundles/netzmachtcontaoleaflet/img/style.png',
- 'attributes' => 'onclick="Backend.getScrollOffset();"'
- ),
- 'popups' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popups'],
- 'href' => 'table=tl_leaflet_popup',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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
- (
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 1,
+ 'fields' => ['title'],
+ 'flag' => 1,
+ 'panelLayout' => 'limit',
+ 'headerFields' => ['title', 'type'],
+ ],
+ 'label' => [
+ 'fields' => ['title', 'type'],
+ 'format' => '%s [%s]',
+ ],
+ 'global_operations' => [
+ 'layers' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['layersBtn'],
+ 'href' => 'table=tl_leaflet_layer',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ 'styles' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['styles'],
+ 'href' => 'table=tl_leaflet_style',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'popups' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popups'],
+ 'href' => 'table=tl_leaflet_popup',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'edit.gif',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'delete' => [
+ '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' => [
'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.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
- ),
- 'show' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['show'],
- 'href' => 'act=show',
- 'icon' => 'show.gif'
- )
- )
- ),
+ ],
+ 'show' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['show'],
+ 'href' => 'act=show',
+ 'icon' => 'show.gif',
+ ],
+ ],
+ ],
- 'palettes' => array(
- '__selector__' => array('type')
- ),
+ 'palettes' => [
+ '__selector__' => ['type'],
+ ],
- 'metapalettes' => array(
- 'default' => array(
- 'title' => array('title', 'alias', 'type'),
- ),
- 'image extends default' => array(
- 'config' => array(
+ 'metapalettes' => [
+ 'default' => [
+ 'title' => ['title', 'alias', 'type'],
+ ],
+ 'image extends default' => [
+ 'config' => [
'iconImage',
'iconRetinaImage',
'iconAnchor',
'popupAnchor',
'className',
- ),
- 'shadow' => array(
+ ],
+ 'shadow' => [
'shadowImage',
'shadowRetinaImage',
'shadowAnchor',
- ),
- 'active' => array(
- 'active'
- )
- ),
+ ],
+ 'active' => [
+ 'active',
+ ],
+ ],
- 'div extends default' => array(
- 'config' => array(
+ 'div extends default' => [
+ 'config' => [
'html',
'iconSize',
'iconAnchor',
'popupAnchor',
'className',
- ),
- 'active' => array(
- 'active'
- )
- ),
+ ],
+ 'active' => [
+ 'active',
+ ],
+ ],
- 'extra extends default' => array(
- 'config' => array(
+ 'extra extends default' => [
+ 'config' => [
'icon',
'prefix',
'shape',
'markerColor',
'number',
'iconColor',
- ),
- 'active' => array(
- 'active'
- )
- ),
- ),
+ ],
+ 'active' => [
+ '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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'title' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
- ),
- 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
- 'toolkit' => [
+ ],
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
- 'sql' => 'varchar(255) NULL'
- ),
- 'type' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['type'],
- 'exclude' => true,
- 'inputType' => 'select',
- 'eval' => array(
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'type' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['type'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'eval' => [
'mandatory' => true,
'tl_class' => 'w50',
'includeBlankOption' => true,
'submitOnChange' => true,
'chosen' => true,
- ),
+ ],
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.icon', 'getIconOptions'],
- '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 ''",
+ 'reference' => &$GLOBALS['TL_LANG']['leaflet_icon'],
+ 'sql' => "varchar(32) NOT NULL default ''",
+ ],
+ 'active' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['active'],
+ 'exclude' => true,
+ 'inputType' => 'checkbox',
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
- 'iconImage' => array
- (
+ ],
+ 'iconImage' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage'],
'exclude' => true,
'inputType' => 'fileTree',
- 'eval' => array(
+ 'eval' => [
'filesOnly' => true,
- 'fieldType' => 'radio',
- 'mandatory' => true,
- 'tl_class' => 'clr',
- 'extensions' => 'gif,png,svg,jpg'
- ),
+ 'fieldType' => 'radio',
+ 'mandatory' => true,
+ 'tl_class' => 'clr',
+ 'extensions' => 'gif,png,svg,jpg',
+ ],
'sql' => 'binary(16) NULL',
- ),
- 'iconRetinaImage' => array
- (
+ ],
+ 'iconRetinaImage' => [
'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'
- ),
+ 'eval' => [
+ 'filesOnly' => true,
+ 'fieldType' => 'radio',
+ 'mandatory' => false,
+ 'tl_class' => 'clr',
+ 'extensions' => 'gif,png,svg,jpg',
+ ],
'sql' => 'binary(16) NULL',
- ),
- 'shadowImage' => array
- (
+ ],
+ 'shadowImage' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowImage'],
'exclude' => true,
'inputType' => 'fileTree',
- 'eval' => array(
+ 'eval' => [
'filesOnly' => true,
'fieldType' => 'radio',
'mandatory' => false,
'tl_class' => 'clr',
- 'extensions' => 'gif,png,svg,jpg'
- ),
+ 'extensions' => 'gif,png,svg,jpg',
+ ],
'sql' => 'binary(16) NULL',
- ),
- 'shadowRetinaImage' => array
- (
+ ],
+ 'shadowRetinaImage' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage'],
'exclude' => true,
'inputType' => 'fileTree',
- 'eval' => array(
+ 'eval' => [
'filesOnly' => true,
'fieldType' => 'radio',
'mandatory' => false,
'tl_class' => 'clr',
- 'extensions' => 'gif,png,svg,jpg'
- ),
+ 'extensions' => 'gif,png,svg,jpg',
+ ],
'sql' => 'binary(16) NULL',
- ),
- 'iconAnchor' => array
- (
+ ],
+ 'iconAnchor' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconAnchor'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
- ),
- 'eval' => array(
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
+ ],
+ 'eval' => [
'maxlength' => 255,
'tl_class' => 'w50',
'nullIfEmpty' => true,
- ),
- 'sql' => 'varchar(255) NULL'
- ),
- 'shadowAnchor' => array
- (
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'shadowAnchor' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowAnchor'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
- ),
- 'eval' => array(
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
+ ],
+ 'eval' => [
'maxlength' => 255,
'tl_class' => 'w50',
'nullIfEmpty' => true,
- ),
- 'sql' => 'varchar(255) NULL'
- ),
- 'popupAnchor' => array
- (
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'popupAnchor' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['popupAnchor'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
- ),
- 'eval' => array(
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
+ ],
+ 'eval' => [
'maxlength' => 255,
'tl_class' => 'w50',
'nullIfEmpty' => true,
- ),
- 'sql' => 'varchar(255) NULL'
- ),
- 'className' => array
- (
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'className' => [
'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(
+ 'eval' => ['mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+ ],
+ 'iconSize' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconSize'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'maxlength' => 64,
'tl_class' => 'w50',
'nullIfEmpty' => true,
- ),
- 'sql' => 'varchar(64) NULL'
- ),
- 'html' => array
- (
+ ],
+ 'sql' => 'varchar(64) NULL',
+ ],
+ 'html' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['html'],
'exclude' => true,
'inputType' => 'textarea',
- 'eval' => array(
+ 'eval' => [
'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(
+ 'tl_class' => 'clr',
+ ],
+ 'sql' => 'mediumtext NULL',
+ ],
+ 'icon' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['icon'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'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(
+ ],
+ 'sql' => 'varchar(64) NULL',
+ ],
+ 'prefix' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['prefix'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'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(
+ ],
+ 'sql' => 'varchar(64) NULL',
+ ],
+ 'shape' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shape'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'default' => 'circle',
+ 'options' => ['circle', 'square', 'star', 'penta'],
+ 'eval' => [
+ 'tl_class' => 'w50',
+ ],
+ 'sql' => 'varchar(64) NULL',
+ ],
+ 'iconColor' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconColor'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'wizard' => [
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
- ),
- 'eval' => array(
+ ],
+ 'eval' => [
'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' => [
+ ],
+ 'sql' => 'varchar(16) NULL',
+ ],
+ 'markerColor' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['markerColor'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'default' => 'circle',
+ 'options' => [
'blue',
'red',
'orange-dark',
@@ -445,13 +406,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'green',
'green-light',
'black',
- 'white'
+ 'white',
],
- 'eval' => array(
+ 'eval' => [
'tl_class' => 'w50',
'nullIfEmpty' => true,
- ),
- 'sql' => 'varchar(16) NULL'
- ),
- ),
-);
+ ],
+ 'sql' => 'varchar(16) NULL',
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_layer.php b/src/Resources/contao/dca/tl_leaflet_layer.php
index 50d0f30..0af696c 100644
--- a/src/Resources/contao/dca/tl_leaflet_layer.php
+++ b/src/Resources/contao/dca/tl_leaflet_layer.php
@@ -25,9 +25,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'alias' => 'unique',
],
],
- 'onload_callback' => array(
+ 'onload_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
- ),
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
@@ -114,12 +114,12 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
'button_callback' => [
'netzmacht.contao_toolkit.dca.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
],
'show' => [
@@ -265,20 +265,20 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
],
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
- 'toolkit' => [
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
'sql' => 'varchar(255) NULL',
],
'type' => [
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'],
- 'exclude' => true,
- 'inputType' => 'select',
- 'filter' => true,
- 'eval' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'filter' => true,
+ 'eval' => [
'mandatory' => true,
'tl_class' => 'w50',
'includeBlankOption' => true,
@@ -286,9 +286,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'chosen' => true,
'helpwizard' => true,
],
- 'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getLayerOptions'],
- 'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'],
- 'sql' => "varchar(32) NOT NULL default ''",
+ 'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getLayerOptions'],
+ 'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'],
+ 'sql' => "varchar(32) NOT NULL default ''",
],
'active' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'],
@@ -302,10 +302,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
],
],
'tile_provider' => [
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'],
- 'exclude' => true,
- 'inputType' => 'select',
- 'eval' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'eval' => [
'mandatory' => true,
'tl_class' => 'w50 clr',
'includeBlankOption' => true,
@@ -313,7 +313,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'chosen' => true,
],
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.layer', 'getProviderOptions'],
- 'sql' => "varchar(32) NOT NULL default ''",
+ 'sql' => "varchar(32) NOT NULL default ''",
],
'tile_provider_variant' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'],
diff --git a/src/Resources/contao/dca/tl_leaflet_map.php b/src/Resources/contao/dca/tl_leaflet_map.php
index 1574705..9a24940 100644
--- a/src/Resources/contao/dca/tl_leaflet_map.php
+++ b/src/Resources/contao/dca/tl_leaflet_map.php
@@ -10,577 +10,524 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_map'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'enableVersioning' => true,
- 'ctable' => array('tl_leaflet_control'),
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_map'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'ctable' => ['tl_leaflet_control'],
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'alias' => 'unique',
- )
- ),
- 'onload_callback' => array(
+ ],
+ ],
+ 'onload_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
- ),
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
+ ],
- 'list' => array
- (
- 'sorting' => array
- (
- 'mode' => 1,
- 'fields' => array('title'),
- 'panelLayout' => 'search,limit',
- 'flag' => 1,
- ),
- 'label' => array
- (
- 'fields' => array('title', 'alias'),
- 'format' => '%s [%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_map']['edit'],
- 'href' => 'act=edit',
- 'icon' => 'header.gif'
- ),
- 'controls' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'],
- 'href' => 'table=tl_leaflet_control',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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'
- )
- )
- ),
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 1,
+ 'fields' => ['title'],
+ 'panelLayout' => 'search,limit',
+ 'flag' => 1,
+ ],
+ 'label' => [
+ 'fields' => ['title', 'alias'],
+ 'format' => '%s [%s]',
+ ],
+ 'global_operations' => [
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'header.gif',
+ ],
+ 'controls' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'],
+ 'href' => 'table=tl_leaflet_control',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/control.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'delete' => [
+ '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' => [
+ '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(
+ 'metapalettes' => [
+ 'default' => [
+ 'title' => ['title', 'alias'],
+ 'zoom' => ['center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad', 'boundsPadding'],
+ 'locate' => ['locate'],
+ 'layers' => ['layers'],
+ 'interaction' => [
'dragging',
'touchZoom',
'scrollWheelZoom',
'doubleClickZoom',
'boxZoom',
'tap',
- 'keyboard'
- ),
- 'behaviour' => array(
+ 'keyboard',
+ ],
+ 'behaviour' => [
'zoomControl',
'trackResize',
'closeOnClick',
- 'bounceAtZoomLimits'
- ),
- 'expert' => array(
+ 'bounceAtZoomLimits',
+ ],
+ 'expert' => [
'options',
'cache',
- )
- ),
- ),
- 'metasubpalettes' => array(
- 'keyboard' => array(
+ ],
+ ],
+ ],
+ 'metasubpalettes' => [
+ 'keyboard' => [
'keyboardPanOffset',
- 'keyboardZoomOffset'
- ),
- 'adjustZoomExtra' => array(
+ 'keyboardZoomOffset',
+ ],
+ 'adjustZoomExtra' => [
'minZoom',
'maxZoom',
'zoomSnap',
'zoomDelta',
- ),
- 'locate' => array(
+ ],
+ 'locate' => [
':hide',
'locateWatch',
'locateSetView',
'locateMaxZoom',
'locateTimeout',
'locateMaximumAge',
- 'enableHighAccuracy'
- ),
- 'cache' => array(
- 'cacheLifeTime'
- )
- ),
+ 'enableHighAccuracy',
+ ],
+ 'cache' => [
+ '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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'title' => [
'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(
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['alias'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'search' => true,
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
- ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias']
- ),
- 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
- 'toolkit' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
+ ],
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
- ]
+ 'fields' => ['title'],
+ ],
],
- 'sql' => 'varchar(255) NULL'
- ),
- 'center' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['center'],
- 'exclude' => true,
- 'inputType' => 'text',
- 'save_callback' => array(
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'center' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['center'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
- ),
- 'wizard' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']
- ),
- 'eval' => array(
- 'maxlength' => 255,
- 'tl_class' => 'long clr',
+ ],
+ 'wizard' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder'],
+ ],
+ 'eval' => [
+ '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(
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'layers' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['layers'],
+ 'exclude' => true,
+ 'inputType' => 'multiColumnWizard',
+ 'load_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.map', 'loadLayerRelations'],
- ),
- 'save_callback' => array(
+ ],
+ 'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.map', 'saveLayerRelations'],
- ),
- 'eval' => array(
- 'multiple' => true,
- 'doNotSaveEmpty' => true,
- 'columnFields' => array(
- 'reference' => array
- (
+ ],
+ 'eval' => [
+ 'multiple' => true,
+ 'doNotSaveEmpty' => true,
+ 'columnFields' => [
+ 'reference' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['reference'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.map', 'getLayers'],
- 'eval' => array(
+ 'eval' => [
'mandatory' => false,
'tl_class' => 'w50',
'chosen' => true,
'includeBlankOption' => true,
- 'style' => 'width: 300px'
- ),
+ 'style' => 'width: 300px',
+ ],
'sql' => "int(10) unsigned NOT NULL default '0'",
- ),
- ),
- 'flatArray' => true
- ),
- 'sql' => 'mediumblob NULL'
- ),
- 'zoom' => array
- (
+ ],
+ ],
+ 'flatArray' => true,
+ ],
+ 'sql' => 'mediumblob NULL',
+ ],
+ 'zoom' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
'default' => null,
- 'eval' => array(
+ 'eval' => [
'maxlength' => 4,
'rgxp' => 'digit',
'tl_class' => 'w50',
'includeBlankOption' => true,
- 'nullIfEmpty' => true
- ),
- 'sql' => 'int(4) NULL'
- ),
- 'adjustZoomExtra' => array
- (
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'adjustZoomExtra' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'minZoom' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['minZoom'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
- 'eval' => array(
+ 'eval' => [
'maxlength' => 4,
'rgxp' => 'digit',
'tl_class' => 'w50',
'includeBlankOption' => true,
- 'nullIfEmpty' => true
- ),
- 'sql' => 'int(4) NULL'
- ),
- 'maxZoom' => array
- (
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'maxZoom' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['maxZoom'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
- 'eval' => array(
+ 'eval' => [
'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(
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'zoomSnap' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomSnap'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'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(
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'varchar(4) NULL',
+ ],
+ 'zoomDelta' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomDelta'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'maxlength' => 4,
'rgxp' => 'digit',
'tl_class' => 'w50',
'includeBlankOption' => true,
- 'nullIfEmpty' => true
- ),
- 'sql' => 'varchar(4) NULL'
- ),
- 'dragging' => array
- (
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'varchar(4) NULL',
+ ],
+ 'dragging' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'touchZoom' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'scrollWheelZoom' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['scrollWheelZoom'],
'exclude' => true,
'inputType' => 'select',
- 'options' => array('1', 'center'),
+ 'options' => ['1', 'center'],
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'],
'default' => true,
- 'eval' => array(
+ 'eval' => [
'tl_class' => 'w50',
'helpwizard' => true,
'includeBlankOption' => true,
- 'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0]
- ),
- 'sql' => "char(6) NOT NULL default ''"
- ),
- 'doubleClickZoom' => array
- (
+ 'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0],
+ ],
+ 'sql' => "char(6) NOT NULL default ''",
+ ],
+ 'doubleClickZoom' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['doubleClickZoom'],
'exclude' => true,
'inputType' => 'select',
- 'options' => array('1', 'center'),
+ 'options' => ['1', 'center'],
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'],
'default' => true,
- 'eval' => array(
+ 'eval' => [
'tl_class' => 'w50',
'helpwizard' => true,
'includeBlankOption' => true,
- 'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0]
- ),
- 'sql' => "char(6) NOT NULL default ''"
- ),
- 'boxZoom' => array
- (
+ 'blankOptionLabel' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0],
+ ],
+ 'sql' => "char(6) NOT NULL default ''",
+ ],
+ 'boxZoom' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'tap' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'trackResize' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'bounceAtZoomLimits' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'closeOnClick' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'keyboard' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'keyboardPanOffset' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50'],
+ 'sql' => "int(4) NOT NULL default '80'",
+ ],
+ 'keyboardZoomOffset' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "int(4) NOT NULL default '1'",
+ ],
+ 'zoomControl' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'options' => [
'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
- (
+ 'eval' => [
+ 'tl_class' => 'clr lng',
+ 'allowHtml' => true,
+ 'style' => 'min-height: 40px;',
+ 'rte' => 'ace|json',
+ ],
+ 'sql' => 'text NULL',
+ ],
+ 'adjustBounds' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'],
'exclude' => true,
'inputType' => 'checkbox',
'default' => false,
- 'options' => array('load', 'deferred'),
+ 'options' => ['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
- (
+ 'eval' => ['tl_class' => 'clr w50', 'multiple' => true, 'helpwizard' => true],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'dynamicLoad' => [
'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(
+ 'eval' => ['tl_class' => 'clr w50', 'submitOnChange' => false],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'boundsPadding' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['boundsPadding'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'maxlength' => 32,
'tl_class' => 'w50',
'includeBlankOption' => true,
- 'nullIfEmpty' => true
- ),
- 'sql' => 'varchar(32) NULL'
- ),
- 'locate' => array
- (
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'varchar(32) NULL',
+ ],
+ 'locate' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'locateWatch' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'locateSetView' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'locateTimeout' => [
'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
- (
+ 'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true],
+ 'sql' => 'int(9) NULL',
+ ],
+ 'locateMaximumAge' => [
'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
- (
+ 'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true],
+ 'sql' => 'int(9) NULL',
+ ],
+ 'enableHighAccuracy' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 m12'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'locateMaxZoom' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locateMaxZoom'],
'exclude' => true,
'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getZoomLevels'],
- 'eval' => array(
+ 'eval' => [
'maxlength' => 4,
'rgxp' => 'digit',
'tl_class' => 'clr w50',
'includeBlankOption' => true,
- 'nullIfEmpty' => true
- ),
- 'sql' => 'int(4) NULL'
- ),
- 'cache' => array
- (
+ 'nullIfEmpty' => true,
+ ],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'cache' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'cacheLifeTime' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['cacheLifeTime'],
'exclude' => true,
'inputType' => 'text',
'default' => 0,
- 'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'),
- 'sql' => "int(9) NOT NULL default '0'"
- ),
- ),
-);
+ 'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "int(9) NOT NULL default '0'",
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_map_layer.php b/src/Resources/contao/dca/tl_leaflet_map_layer.php
index ab8a034..842a22e 100644
--- a/src/Resources/contao/dca/tl_leaflet_map_layer.php
+++ b/src/Resources/contao/dca/tl_leaflet_map_layer.php
@@ -10,40 +10,32 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_map_layer'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_map_layer'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'mid,lid' => 'unique',
- )
- )
- ),
+ ],
+ ],
+ ],
- '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'"
- ),
- 'mid' => array
- (
- 'sql' => "int(10) unsigned NOT NULL default '0'"
- ),
- 'lid' => array
- (
- 'sql' => "int(10) unsigned NOT NULL default '0'"
- ),
- )
-);
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'sorting' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'mid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'lid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_marker.php b/src/Resources/contao/dca/tl_leaflet_marker.php
index 81efd2b..099a385 100644
--- a/src/Resources/contao/dca/tl_leaflet_marker.php
+++ b/src/Resources/contao/dca/tl_leaflet_marker.php
@@ -10,120 +10,104 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'enableVersioning' => true,
- 'ptable' => 'tl_leaflet_layer',
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_marker'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'ptable' => 'tl_leaflet_layer',
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
- )
- ),
- 'onload_callback' => array(
+ ],
+ ],
+ 'onload_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'initialize'],
- ),
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', '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_maps.listeners.dca.marker', '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' => 'bundles/netzmachtcontaoleaflet/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' => 'bundles/netzmachtcontaoleaflet/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
- (
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 4,
+ 'fields' => ['sorting'],
+ 'flag' => 1,
+ 'panelLayout' => 'sort,filter;search,limit',
+ 'headerFields' => ['title', 'type'],
+ 'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'generateRow'],
+ ],
+ 'label' => [
+ 'fields' => ['title'],
+ 'format' => '%s',
+ ],
+ 'global_operations' => [
+ 'icons' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icons'],
+ 'href' => 'table=tl_leaflet_icon&id=',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ 'popups' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popups'],
+ 'href' => 'table=tl_leaflet_popup',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'edit.gif',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'delete' => [
+ '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' => [
'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.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
- ),
- 'show' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['show'],
- 'href' => 'act=show',
- 'icon' => 'show.gif'
- )
- )
- ),
+ ],
+ 'show' => [
+ '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(
+ 'metapalettes' => [
+ 'default' => [
+ 'title' => ['title', 'alias', 'coordinates'],
+ 'content' => ['tooltip', 'alt', 'addPopup'],
+ 'config' => [
':hide',
'clickable',
'draggable',
@@ -133,250 +117,226 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'riseOnHover',
'riseOffset',
'customIcon',
- ),
- 'expert' => array(':hide', 'featureData'),
- 'active' => array('active', 'ignoreForBounds')
- ),
- ),
- 'metasubpalettes' => array(
- 'addPopup' => array('popup', 'popupContent'),
- 'customIcon' => array('icon')
- ),
+ ],
+ 'expert' => [':hide', 'featureData'],
+ 'active' => ['active', 'ignoreForBounds'],
+ ],
+ ],
+ 'metasubpalettes' => [
+ 'addPopup' => ['popup', 'popupContent'],
+ 'customIcon' => ['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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
'sql' => "int(10) unsigned NOT NULL default '0'",
- 'sorting' => true,
- ),
- 'pid' => array
- (
- 'sql' => "int(10) unsigned NOT NULL default '0'"
- ),
- 'title' => array
- (
+ ],
+ 'sorting' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ 'sorting' => true,
+ ],
+ 'pid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'title' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias'],
'exclude' => true,
'inputType' => 'text',
'search' => true,
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
- ),
- 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
- 'toolkit' => [
+ ],
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
- 'sql' => 'varchar(255) NULL'
- ),
- 'coordinates' => array
- (
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'coordinates' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
- array('netzmacht.contao_leaflet_maps.listeners.dca.marker', 'saveCoordinates')
- ),
- 'load_callback' => array(
- array('netzmacht.contao_leaflet_maps.listeners.dca.marker', 'loadCoordinates')
- ),
- 'wizard' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']
- ),
- 'eval' => array(
+ ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'saveCoordinates'],
+ ],
+ 'load_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'loadCoordinates'],
+ ],
+ 'wizard' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder'],
+ ],
+ 'eval' => [
'maxlength' => 255,
'tl_class' => 'long clr',
'nullIfEmpty' => true,
'doNotSaveEmpty' => true,
- ),
- ),
- 'latitude' => array
- (
+ ],
+ ],
+ 'latitude' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => 'decimal(10,8) NULL',
+ ],
+ 'longitude' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => 'decimal(11,8) NULL',
+ ],
+ 'altitude' => [
'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 ''",
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => 'float NULL',
+ ],
+ 'active' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'],
+ 'exclude' => true,
+ 'filter' => true,
+ 'sorting' => true,
+ 'flag' => 12,
+ 'inputType' => 'checkbox',
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
- 'tooltip' => array
- (
+ ],
+ 'tooltip' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alt' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'addPopup' => [
'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',
+ 'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'popup' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popup'],
+ 'exclude' => true,
+ 'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'getPopups'],
- 'eval' => array(
+ 'eval' => [
'mandatory' => false,
'tl_class' => 'w50',
'chosen' => true,
'includeBlankOption' => true,
- ),
- 'sql' => "int(10) unsigned NOT NULL default '0'",
- ),
- 'popupContent' => array
- (
+ ],
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'popupContent' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent'],
'exclude' => true,
'inputType' => 'text',
- 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
+ 'eval' => ['mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'],
'explanation' => 'insertTags',
- 'sql' => 'mediumtext NULL'
- ),
- 'customIcon' => array
- (
+ 'sql' => 'mediumtext NULL',
+ ],
+ 'customIcon' => [
'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_maps.listeners.dca.marker', 'getIcons'),
- 'eval' => array(
- 'mandatory' => true,
- 'tl_class' => 'w50',
- 'chosen' => true,
- ),
- 'sql' => "int(10) unsigned NOT NULL default '0'",
- ),
- 'draggable' => array
- (
+ 'eval' => ['tl_class' => 'clr w50 m12', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'icon' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.marker', 'getIcons'],
+ 'eval' => [
+ 'mandatory' => true,
+ 'tl_class' => 'w50',
+ 'chosen' => true,
+ ],
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'draggable' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'clickable' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'keyboard' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'zIndexOffset' => [
'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
- (
+ 'eval' => ['maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true],
+ 'sql' => 'int(5) NULL',
+ ],
+ 'ignoreForBounds' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'featureData' => [
'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'
- ),
- ),
-);
+ 'eval' => [
+ 'tl_class' => 'clr lng',
+ 'allowHtml' => true,
+ 'style' => 'min-height: 40px;',
+ 'rte' => 'ace|json',
+ ],
+ 'sql' => 'text NULL',
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_popup.php b/src/Resources/contao/dca/tl_leaflet_popup.php
index 1b595cc..dff2b01 100644
--- a/src/Resources/contao/dca/tl_leaflet_popup.php
+++ b/src/Resources/contao/dca/tl_leaflet_popup.php
@@ -10,125 +10,108 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'enableVersioning' => true,
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_popup'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'alias' => 'unique',
- )
- ),
+ ],
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', '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 [%s]',
- ),
- 'global_operations' => array
- (
- 'layers' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'],
- 'href' => 'table=tl_leaflet_layer',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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' => 'bundles/netzmachtcontaoleaflet/img/style.png',
- 'attributes' => 'onclick="Backend.getScrollOffset();"'
- ),
- 'icons' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'],
- 'href' => 'table=tl_leaflet_icon',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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
- (
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 1,
+ 'fields' => ['title'],
+ 'flag' => 1,
+ 'panelLayout' => 'limit',
+ 'headerFields' => ['title', 'type'],
+ ],
+ 'label' => [
+ 'fields' => ['title', 'type'],
+ 'format' => '%s [%s]',
+ ],
+ 'global_operations' => [
+ 'layers' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'],
+ 'href' => 'table=tl_leaflet_layer',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ 'styles' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'],
+ 'href' => 'table=tl_leaflet_style',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'icons' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'],
+ 'href' => 'table=tl_leaflet_icon',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'edit.gif',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'delete' => [
+ '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' => [
'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.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
- ),
- 'show' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['show'],
- 'href' => 'act=show',
- 'icon' => 'show.gif'
- )
- )
- ),
+ ],
+ 'show' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['show'],
+ 'href' => 'act=show',
+ 'icon' => 'show.gif',
+ ],
+ ],
+ ],
- 'palettes' => array(
- '__selector__' => array('type')
- ),
+ 'palettes' => [
+ '__selector__' => ['type'],
+ ],
- 'metapalettes' => array(
- 'default' => array(
- 'title' => array('title', 'alias'),
- 'size' => array('maxWidth', 'minWidth', 'maxHeight'),
- 'config' => array(
+ 'metapalettes' => [
+ 'default' => [
+ 'title' => ['title', 'alias'],
+ 'size' => ['maxWidth', 'minWidth', 'maxHeight'],
+ 'config' => [
':hide',
'closeButton',
'keepInView',
@@ -136,175 +119,158 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = array
'zoomAnimation',
'offset',
'className',
- 'autoPan'
- ),
- 'active' => array('active'),
- ),
- ),
+ 'autoPan',
+ ],
+ 'active' => ['active'],
+ ],
+ ],
- 'metasubpalettes' => array(
- 'autoPan' => array('autoPanPadding')
- ),
+ 'metasubpalettes' => [
+ 'autoPan' => ['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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'title' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['alias'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
- ),
- 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
- 'toolkit' => [
+ ],
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
- 'sql' => 'varchar(255) NULL'
- ),
- 'maxWidth' => array
- (
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'maxWidth' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'minWidth' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'maxHeight' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => 'int(4) NULL',
+ ],
+ 'autoPan' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'keepInView' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'closeButton' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'offset' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['offset'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
- ),
- 'eval' => array(
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
+ ],
+ 'eval' => [
'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(
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'autoPanPadding' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['autoPanPadding'],
+ 'exclude' => true,
+ 'inputType' => 'text',
+ 'eval' => [
'maxlength' => 255,
'tl_class' => 'w50',
'nullIfEmpty' => true,
'multiple' => true,
'size' => 2,
- ),
- 'sql' => 'varchar(255) NULL'
- ),
- 'zoomAnimation' => array
- (
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'zoomAnimation' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'closeOnClick' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => false],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'className' => [
'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 ''",
+ 'eval' => ['mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+ ],
+ 'active' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['active'],
+ 'exclude' => true,
+ 'inputType' => 'checkbox',
+ 'filter' => true,
+ 'sorting' => true,
+ 'search' => false,
+ 'flag' => 12,
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
- ),
-);
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_style.php b/src/Resources/contao/dca/tl_leaflet_style.php
index dec0168..f929d5c 100644
--- a/src/Resources/contao/dca/tl_leaflet_style.php
+++ b/src/Resources/contao/dca/tl_leaflet_style.php
@@ -10,309 +10,275 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_style'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'enableVersioning' => true,
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_style'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'alias' => 'unique',
- )
- ),
+ ],
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', '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 [%s]',
- ),
- 'global_operations' => array
- (
- 'layers' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'],
- 'href' => 'table=tl_leaflet_layer',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
- 'attributes' => 'onclick="Backend.getScrollOffset();"'
- ),
- 'popups' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'],
- 'href' => 'table=tl_leaflet_popup',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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
- (
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 1,
+ 'fields' => ['title'],
+ 'flag' => 1,
+ 'panelLayout' => 'limit',
+ 'headerFields' => ['title', 'type'],
+ ],
+ 'label' => [
+ 'fields' => ['title', 'type'],
+ 'format' => '%s [%s]',
+ ],
+ 'global_operations' => [
+ 'layers' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'],
+ 'href' => 'table=tl_leaflet_layer',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/layers.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ 'icons' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'],
+ 'href' => 'table=tl_leaflet_icon',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/icons.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'popups' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'],
+ 'href' => 'table=tl_leaflet_popup',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'edit.gif',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'delete' => [
+ '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' => [
'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.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
- ),
- 'show' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['show'],
- 'href' => 'act=show',
- 'icon' => 'show.gif'
- )
- )
- ),
+ ],
+ 'show' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['show'],
+ 'href' => 'act=show',
+ 'icon' => 'show.gif',
+ ],
+ ],
+ ],
- 'palettes' => array(
- '__selector__' => array('type')
- ),
+ 'palettes' => [
+ '__selector__' => ['type'],
+ ],
- 'metapalettes' => array(
- 'default' => array(
- 'title' => array('title', 'alias', 'type'),
- 'config' => array(),
- 'active' => array('active'),
- ),
- 'fixed extends default' => array(
- 'config' => array('stroke', 'fill'),
- ),
- ),
+ 'metapalettes' => [
+ 'default' => [
+ 'title' => ['title', 'alias', 'type'],
+ 'config' => [],
+ 'active' => ['active'],
+ ],
+ 'fixed extends default' => [
+ 'config' => ['stroke', 'fill'],
+ ],
+ ],
- 'metasubpalettes' => array(
- 'stroke' => array('color', 'weight', 'opacity', 'dashArray', 'lineCap', 'lineJoin'),
- 'fill' => array('fillColor', 'fillOpacity',)
- ),
+ 'metasubpalettes' => [
+ 'stroke' => ['color', 'weight', 'opacity', 'dashArray', 'lineCap', 'lineJoin'],
+ 'fill' => ['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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'title' => [
'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
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['alias'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
- ),
- 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
- 'toolkit' => [
+ ],
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
- 'sql' => 'varchar(255) NULL'
- ),
- 'type' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['type'],
- 'exclude' => true,
- 'inputType' => 'select',
- 'eval' => array(
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'type' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['type'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'eval' => [
'mandatory' => true,
'tl_class' => 'w50',
'includeBlankOption' => true,
'submitOnChange' => true,
'chosen' => true,
- ),
+ ],
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.style', 'getStyleOptions'],
- 'reference' => &$GLOBALS['TL_LANG']['leaflet_style'],
- 'sql' => "varchar(32) NOT NULL default ''"
- ),
- 'stroke' => array
- (
+ 'reference' => &$GLOBALS['TL_LANG']['leaflet_style'],
+ 'sql' => "varchar(32) NOT NULL default ''",
+ ],
+ 'stroke' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default '1'",
+ ],
+ 'color' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['color'],
'exclude' => true,
'inputType' => 'text',
- 'wizard' => array(
+ 'wizard' => [
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
- ),
- 'eval' => array(
+ ],
+ 'eval' => [
'tl_class' => 'w50 wizard clr',
'maxlength' => 7,
- 'decodeEntities' => true
- ),
- 'sql' => "varchar(8) NOT NULL default ''"
- ),
- 'weight' => array
- (
+ 'decodeEntities' => true,
+ ],
+ 'sql' => "varchar(8) NOT NULL default ''",
+ ],
+ 'weight' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "int(4) NOT NULL default '5'",
+ ],
+ 'opacity' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "varchar(4) NOT NULL default '0.5'",
+ ],
+ 'fill' => [
'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
- (
+ 'eval' => ['tl_class' => 'clr w50', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'fillColor' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['fillColor'],
'exclude' => true,
'inputType' => 'text',
- 'wizard' => array(
+ 'wizard' => [
['netzmacht.contao_toolkit.dca.listeners.color_picker', 'handleWizardCallback'],
- ),
- 'eval' => array(
+ ],
+ 'eval' => [
'tl_class' => 'clr w50 wizard',
'maxlength' => 7,
- 'decodeEntities' => true
- ),
- 'sql' => "varchar(8) NOT NULL default ''"
- ),
- 'fillOpacity' => array
- (
+ 'decodeEntities' => true,
+ ],
+ 'sql' => "varchar(8) NOT NULL default ''",
+ ],
+ 'fillOpacity' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "varchar(4) NOT NULL default '0.2'",
+ ],
+ 'dashArray' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 32, 'tl_class' => 'w50'],
+ 'sql' => "varchar(32) NOT NULL default ''",
+ ],
+ 'lineCap' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCap'],
'exclude' => true,
'inputType' => 'select',
- 'options' => array('butt', 'round', 'square', 'inherit'),
+ 'options' => ['butt', 'round', 'square', 'inherit'],
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineCaps'],
- 'eval' => array(
+ 'eval' => [
'mandatory' => false,
'tl_class' => 'w50 clr',
'includeBlankOption' => true,
'helpwizard' => true,
- ),
+ ],
'sql' => "varchar(8) NOT NULL default ''",
- ),
- 'lineJoin' => array
- (
+ ],
+ 'lineJoin' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['lineJoin'],
'exclude' => true,
'inputType' => 'select',
- 'options' => array('miter', 'round', 'bevel', 'inherit'),
+ 'options' => ['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 ''",
+ 'eval' => ['mandatory' => false, 'tl_class' => 'w50', 'includeBlankOption' => true, 'helpwizard'],
+ 'sql' => "varchar(8) NOT NULL default ''",
+ ],
+ 'active' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['active'],
+ 'exclude' => true,
+ 'inputType' => 'checkbox',
+ 'filter' => true,
+ 'sorting' => true,
+ 'search' => false,
+ 'flag' => 12,
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
- ),
-);
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_leaflet_vector.php b/src/Resources/contao/dca/tl_leaflet_vector.php
index 99d0263..9883a2c 100644
--- a/src/Resources/contao/dca/tl_leaflet_vector.php
+++ b/src/Resources/contao/dca/tl_leaflet_vector.php
@@ -10,185 +10,162 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
-(
- 'config' => array(
- 'dataContainer' => 'Table',
- 'enableVersioning' => true,
- 'ptable' => 'tl_leaflet_layer',
- 'sql' => array
- (
- 'keys' => array
- (
+$GLOBALS['TL_DCA']['tl_leaflet_vector'] = [
+ 'config' => [
+ 'dataContainer' => 'Table',
+ 'enableVersioning' => true,
+ 'ptable' => 'tl_leaflet_layer',
+ 'sql' => [
+ 'keys' => [
'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
- )
- ),
- 'onload_callback' => array(
+ ],
+ ],
+ 'onload_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
- ),
+ ],
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', '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_maps.listeners.dca.vector', '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' => 'bundles/netzmachtcontaoleaflet/img/style.png',
- 'attributes' => 'onclick="Backend.getScrollOffset();"'
- ),
- 'popups' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popups'],
- 'href' => 'table=tl_leaflet_popup',
- 'icon' => 'bundles/netzmachtcontaoleaflet/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&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
- (
+ 'list' => [
+ 'sorting' => [
+ 'mode' => 4,
+ 'fields' => ['sorting'],
+ 'flag' => 1,
+ 'panelLayout' => 'sort,filter;search,limit',
+ 'headerFields' => ['title', 'type'],
+ 'child_record_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'generateRow'],
+ ],
+ 'label' => [
+ 'fields' => ['title'],
+ 'format' => '%s',
+ ],
+ 'global_operations' => [
+ 'styles' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['styles'],
+ 'href' => 'table=tl_leaflet_style',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/style.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'popups' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popups'],
+ 'href' => 'table=tl_leaflet_popup',
+ 'icon' => 'bundles/netzmachtcontaoleaflet/img/popup.png',
+ 'attributes' => 'onclick="Backend.getScrollOffset();"',
+ ],
+ 'all' => [
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
+ 'href' => 'act=select',
+ 'class' => 'header_edit_all',
+ 'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"',
+ ],
+ ],
+ 'operations' => [
+ 'edit' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['edit'],
+ 'href' => 'act=edit',
+ 'icon' => 'edit.gif',
+ ],
+ 'copy' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['copy'],
+ 'href' => 'act=copy',
+ 'icon' => 'copy.gif',
+ ],
+ 'cut' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['cut'],
+ 'href' => 'act=paste&mode=cut',
+ 'icon' => 'cut.gif',
+ 'attributes' => 'onclick="Backend.getScrollOffset()"',
+ ],
+ 'delete' => [
+ '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' => [
'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.listeners.state_button_callback',
- 'handleButtonCallback'
+ 'handleButtonCallback',
],
- 'toolkit' => [
+ 'toolkit' => [
'state_button' => [
- 'stateColumn' => ['active']
- ]
+ 'stateColumn' => ['active'],
+ ],
],
- ),
- 'show' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['show'],
- 'href' => 'act=show',
- 'icon' => 'show.gif'
- )
- )
- ),
+ ],
+ 'show' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['show'],
+ 'href' => 'act=show',
+ 'icon' => 'show.gif',
+ ],
+ ],
+ ],
- 'palettes' => array(
- '__selector__' => array('type')
- ),
+ 'palettes' => [
+ '__selector__' => ['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')
- ),
+ 'metapalettes' => [
+ 'default' => [
+ 'title' => ['title', 'alias', 'type'],
+ 'data' => [],
+ 'popup' => [':hide', 'addPopup'],
+ 'config' => [':hide', 'style', 'className', 'clickable'],
+ 'expert' => [':hide', 'featureData'],
+ 'active' => ['active', 'ignoreForBounds'],
+ ],
- 'polyline extends default' => array(
- '+config' => array('smoothFactor', 'noClip'),
- 'data' => array('data')
- ),
+ 'polyline extends default' => [
+ '+config' => ['smoothFactor', 'noClip'],
+ 'data' => ['data'],
+ ],
- 'multiPolyline extends polyline' => array(
- 'data' => array('multiData')
- ),
+ 'multiPolyline extends polyline' => [
+ 'data' => ['multiData'],
+ ],
- 'polygon extends polyline' => array(),
+ 'polygon extends polyline' => [],
- 'multiPolygon extends multiPolyline' => array(
- ),
+ 'multiPolygon extends multiPolyline' => [
+ ],
- 'rectangle extends polygon' => array(
- 'data' => array('bounds'),
- ),
+ 'rectangle extends polygon' => [
+ 'data' => ['bounds'],
+ ],
- 'circle extends default' => array(
- '+data' => array('coordinates', 'radius'),
- ),
+ 'circle extends default' => [
+ '+data' => ['coordinates', 'radius'],
+ ],
- 'circleMarker extends circle' => array(),
- ),
- 'metasubpalettes' => array(
- 'addPopup' => array('popup', 'popupContent'),
- ),
+ 'circleMarker extends circle' => [],
+ ],
+ 'metasubpalettes' => [
+ 'addPopup' => ['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
- (
+ 'fields' => [
+ 'id' => [
+ 'sql' => 'int(10) unsigned NOT NULL auto_increment',
+ ],
+ 'tstamp' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'pid' => [
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'sorting' => [
'sql' => "int(10) unsigned NOT NULL default '0'",
'sorting' => true,
- ),
- 'title' => array
- (
+ ],
+ 'title' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['title'],
'exclude' => true,
'inputType' => 'text',
@@ -196,226 +173,209 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'sorting' => true,
'search' => true,
'flag' => 1,
- 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
- 'sql' => "varchar(255) NOT NULL default ''"
- ),
- 'alias' => array
- (
+ 'eval' => ['mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'],
+ 'sql' => "varchar(255) NOT NULL default ''",
+ ],
+ 'alias' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['alias'],
'exclude' => true,
'inputType' => 'text',
'search' => true,
- 'save_callback' => array(
+ 'save_callback' => [
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
- ),
- 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
- 'toolkit' => [
+ ],
+ 'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
+ 'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
- 'fields' => ['title']
+ 'fields' => ['title'],
],
],
- '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(
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'type' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['type'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'filter' => true,
+ 'sorting' => true,
+ 'search' => false,
+ 'flag' => 1,
+ 'eval' => [
'mandatory' => true,
'tl_class' => 'w50',
'includeBlankOption' => true,
'submitOnChange' => true,
'chosen' => true,
'helpwizard' => true,
- ),
+ ],
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'getVectorOptions'],
- '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 ''",
+ 'reference' => &$GLOBALS['TL_LANG']['leaflet_vector'],
+ 'sql' => "varchar(32) NOT NULL default ''",
+ ],
+ 'active' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['active'],
+ 'exclude' => true,
+ 'inputType' => 'checkbox',
+ 'filter' => true,
+ 'sorting' => true,
+ 'search' => false,
+ 'flag' => 12,
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
'save_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],
- ),
- 'addPopup' => array
- (
+ ],
+ 'addPopup' => [
'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\Listener\Dca\MarkerDcaListener', 'getPopups'),
- 'eval' => array(
+ 'eval' => ['tl_class' => 'w50 m12', 'submitOnChange' => true],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'popup' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popup'],
+ 'exclude' => true,
+ 'inputType' => 'select',
+ 'options_callback' => ['Netzmacht\Contao\Leaflet\Listener\Dca\MarkerDcaListener', 'getPopups'],
+ 'eval' => [
'mandatory' => false,
'tl_class' => 'w50',
'chosen' => true,
'includeBlankOption' => true,
- ),
- 'sql' => "int(10) unsigned NOT NULL default '0'",
- ),
- 'popupContent' => array
- (
+ ],
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'popupContent' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['popupContent'],
'exclude' => true,
'inputType' => 'text',
- 'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
+ 'eval' => ['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',
+ 'sql' => 'mediumtext NULL',
+ ],
+ 'style' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'],
+ 'exclude' => true,
+ 'inputType' => 'select',
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.vector', 'getStyles'],
- 'eval' => array(
- 'mandatory' => false,
- 'tl_class' => 'w50',
- 'chosen' => true,
+ 'eval' => [
+ 'mandatory' => false,
+ 'tl_class' => 'w50',
+ 'chosen' => true,
'includeBlankOption' => true,
- ),
- 'sql' => "int(10) unsigned NOT NULL default '0'",
- ),
- 'clickable' => array
- (
+ ],
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+ ],
+ 'clickable' => [
'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
- (
+ 'eval' => ['tl_class' => 'm12 w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'className' => [
'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
- (
+ 'eval' => ['mandatory' => false, 'maxlength' => 64, 'tl_class' => 'w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+ ],
+ 'coordinates' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['coordinates'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates']
- ),
- 'wizard' => array(
- ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']
- ),
- 'eval' => array(
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
+ ],
+ 'wizard' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder'],
+ ],
+ 'eval' => [
'maxlength' => 255,
'tl_class' => 'long clr',
'nullIfEmpty' => true,
'mandatory' => true,
- ),
- 'sql' => 'varchar(255) NULL'
- ),
- 'radius' => array
- (
+ ],
+ 'sql' => 'varchar(255) NULL',
+ ],
+ 'radius' => [
'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_maps.listeners.dca.validator', 'validateMultipleCoordinates']
- ),
- 'sql' => 'longblob NULL'
- ),
- 'multiData' => array
- (
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData'],
- 'inputType' => 'multiColumnWizard',
- 'search' => false,
- 'eval' => array(
+ 'eval' => ['mandatory' => false, 'maxlength' => 10, 'rgxp' => 'digit', 'tl_class' => 'clr w50'],
+ 'sql' => "int(10) NOT NULL default '5'",
+ ],
+ 'data' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['data'],
+ 'inputType' => 'textarea',
+ 'search' => false,
+ 'eval' => ['mandatory' => true, 'alwaysSave' => true],
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateMultipleCoordinates'],
+ ],
+ 'sql' => 'longblob NULL',
+ ],
+ 'multiData' => [
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['multiData'],
+ 'inputType' => 'multiColumnWizard',
+ 'search' => false,
+ 'eval' => [
'mandatory' => true,
'alwaysSave' => true,
'flatArray' => true,
- 'columnFields' => array
- (
- 'data' => array
- (
+ 'columnFields' => [
+ 'data' => [
'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_maps.listeners.dca.validator', 'validateMultipleCoordinateSets']
- ),
- 'sql' => 'longblob NULL'
- ),
- 'bounds' => array
- (
+ 'eval' => ['alwaysSave' => true, 'style' => 'width:600px'],
+ ],
+ ],
+ ],
+ 'save_callback' => [
+ ['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateMultipleCoordinateSets'],
+ ],
+ 'sql' => 'longblob NULL',
+ ],
+ 'bounds' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'],
'exclude' => true,
'inputType' => 'text',
- 'save_callback' => array(),
- 'eval' => array(
+ 'save_callback' => [],
+ 'eval' => [
'maxlength' => 255,
'multiple' => true,
'size' => 2,
'tl_class' => 'long clr',
'nullIfEmpty' => true,
- ),
- 'sql' => 'mediumblob NULL'
- ),
- 'ignoreForBounds' => array
- (
+ ],
+ 'sql' => 'mediumblob NULL',
+ ],
+ 'ignoreForBounds' => [
'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
- (
+ 'eval' => ['tl_class' => 'w50'],
+ 'sql' => "char(1) NOT NULL default ''",
+ ],
+ 'featureData' => [
'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'
- ),
- ),
-);
+ 'eval' => [
+ 'tl_class' => 'clr lng',
+ 'allowHtml' => true,
+ 'style' => 'min-height: 40px;',
+ 'rte' => 'ace|json',
+ ],
+ 'sql' => 'text NULL',
+ ],
+ ],
+];
diff --git a/src/Resources/contao/dca/tl_module.php b/src/Resources/contao/dca/tl_module.php
index a48bacd..e99cfbb 100644
--- a/src/Resources/contao/dca/tl_module.php
+++ b/src/Resources/contao/dca/tl_module.php
@@ -10,76 +10,76 @@
* @filesource
*/
-$GLOBALS['TL_DCA']['tl_module']['metapalettes']['leaflet'] = array(
- 'type' => array('name', 'type', 'headline'),
- 'leaflet' => array('leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'),
- 'templates' => array(':hide', 'customTpl'),
- 'protected' => array(':hide', 'protected'),
- 'expert' => array(':hide', 'guests', 'cssID', 'space'),
- 'invisible' => array(':hide', 'invisible', 'start', 'start')
-);
+$GLOBALS['TL_DCA']['tl_module']['metapalettes']['leaflet'] = [
+ 'type' => ['name', 'type', 'headline'],
+ 'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'],
+ 'templates' => [':hide', 'customTpl'],
+ 'protected' => [':hide', 'protected'],
+ 'expert' => [':hide', 'guests', 'cssID', 'space'],
+ 'invisible' => [':hide', 'invisible', 'start', 'start'],
+];
-$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_map'] = array(
+$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_map'] = [
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_map'],
'inputType' => 'select',
'exclude' => true,
'options_callback' => ['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getMaps'],
- 'wizard' => array(
+ 'wizard' => [
['netzmacht.contao_leaflet_maps.listeners.dca.frontend_integration', 'getEditMapLink'],
- ),
- 'eval' => array(
+ ],
+ 'eval' => [
'tl_class' => 'w50 wizard',
'chosen' => true,
- ),
- 'sql' => "int(10) unsigned NOT NULL default '0'"
-);
+ ],
+ 'sql' => "int(10) unsigned NOT NULL default '0'",
+];
-$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_mapId'] = array(
- 'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_mapId'],
- 'inputType' => 'text',
- 'exclude' => true,
- 'eval' => array(
+$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_mapId'] = [
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_mapId'],
+ 'inputType' => 'text',
+ 'exclude' => true,
+ 'eval' => [
'tl_class' => 'w50',
'chosen' => true,
'maxlength' => 16,
- ),
- 'sql' => "varchar(16) NOT NULL default ''"
-);
+ ],
+ 'sql' => "varchar(16) NOT NULL default ''",
+];
-$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_width'] = array(
+$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_width'] = [
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_width'],
'inputType' => 'inputUnit',
- 'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
+ 'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
'search' => false,
'exclude' => true,
- 'eval' => array('rgxp' => 'digit', 'tl_class' => 'clr w50'),
- 'sql' => "varchar(64) NOT NULL default ''"
-);
+ 'eval' => ['rgxp' => 'digit', 'tl_class' => 'clr w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+];
-$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_height'] = array(
+$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_height'] = [
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_height'],
'inputType' => 'inputUnit',
- 'options' => array('px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'),
+ 'options' => ['px', '%', 'em', 'pt', 'pc', 'in', 'cm', 'mm'],
'search' => false,
'exclude' => true,
- 'eval' => array('rgxp' => 'digit', 'tl_class' => 'w50'),
- 'sql' => "varchar(64) NOT NULL default ''"
-);
+ 'eval' => ['rgxp' => 'digit', 'tl_class' => 'w50'],
+ 'sql' => "varchar(64) NOT NULL default ''",
+];
-$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = array(
+$GLOBALS['TL_DCA']['tl_module']['fields']['leaflet_template'] = [
'label' => &$GLOBALS['TL_LANG']['tl_module']['leaflet_template'],
'inputType' => 'select',
'exclude' => true,
'options_callback' => ['netzmacht.contao_toolkit.dca.listeners.template_options', 'handleOptionsCallback'],
- 'eval' => array(
+ 'eval' => [
'tl_class' => 'w50',
'chosen' => true,
- ),
- 'toolkit' => [
- 'template_options' => [
- 'prefix' => 'leaflet_map_js'
- ]
],
- 'sql' => "varchar(64) NOT NULL default ''"
-);
+ 'toolkit' => [
+ 'template_options' => [
+ 'prefix' => 'leaflet_map_js',
+ ],
+ ],
+ 'sql' => "varchar(64) NOT NULL default ''",
+];