vendor/con4gis/maps/Resources/contao/dca/tl_c4g_map_baselayers.php line 24

Open in your IDE?
  1. <?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
  2. /**
  3.  * con4gis - the gis-kit
  4.  *
  5.  * @version   php 7
  6.  * @package   con4gis
  7.  * @author    con4gis contributors (see "authors.txt")
  8.  * @license   GNU/LGPL http://opensource.org/licenses/lgpl-3.0.html
  9.  * @copyright Küstenschmiede GmbH Software & Design 2011 - 2018
  10.  * @link      https://www.kuestenschmiede.de
  11.  */
  12. /**
  13.  * Table tl_c4g_map_baselayers
  14.  */
  15. $GLOBALS['TL_DCA']['tl_c4g_map_baselayers'] = array
  16. (
  17.     // Config
  18.     'config' => array
  19.     (
  20.         'label'                       => $GLOBALS['TL_LANG']['MOD']['c4g_map_baselayers'][0],
  21.         'dataContainer'               => 'Table',
  22.         'ctable'                      => array('tl_c4g_map_overlays'),
  23.         'enableVersioning'            => true,
  24.         'onsubmit_callback'             => array(
  25.             array('\con4gis\CoreBundle\Resources\contao\classes\C4GAutomator''purgeApiCache')
  26.         ),
  27.         'sql'                         => array
  28.         (
  29.             'keys' => array
  30.             (
  31.                 'id' => 'primary',
  32.                 'pid' => 'index'
  33.             )
  34.         ),
  35.     ),
  36.     // List
  37.     'list' => array
  38.     (
  39.         'sorting' => array
  40.         (
  41.             'mode'                    => 5,
  42.             'icon'                    => 'bundels/con4gisMapsBundle/images/core.png',
  43.             'panelLayout'             => 'search',
  44.             'paste_button_callback'   => array('tl_c4g_map_baselayers''pasteElement')
  45.         ),
  46.         'label' => array
  47.         (
  48.             'fields'                  => array('name','display_name','minzoomlevel','maxzoomlevel'),
  49.             'format'                  => '<span style="color:#303E4D"><b>%s</b></span> -> %s [˅%s,˄%s]',
  50.             'label_callback'          => array('tl_c4g_map_baselayers''addIcon')
  51.         ),
  52.         'global_operations' => array
  53.         (
  54.             'all' => array
  55.             (
  56.                 'label'               => &$GLOBALS['TL_LANG']['MSC']['all'],
  57.                 'href'                => 'act=select',
  58.                 'class'               => 'header_edit_all',
  59.                 'attributes'          => 'onclick="Backend.getScrollOffset();" accesskey="e"'
  60.             )
  61.         ),
  62.         'operations' => array
  63.         (
  64.             'edit' => array
  65.             (
  66.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['edit'],
  67.                 'href'                => 'act=edit',
  68.                 'icon'                => 'edit.gif'
  69.             ),
  70.             'copy' => array
  71.             (
  72.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['copy'],
  73.                 'href'                => 'act=paste&amp;mode=copy&amp;childs=1',
  74.                 'icon'                => 'copy.gif',
  75.                 'attributes'          => 'onclick="Backend.getScrollOffset();"',
  76.             ),
  77.             'cut' => array
  78.             (
  79.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['cut'],
  80.                 'href'                => 'act=paste&amp;mode=cut&amp;childs=1',
  81.                 'icon'                => 'cut.gif',
  82.                 'attributes'          => 'onclick="Backend.getScrollOffset();"',
  83.             ),
  84.             'delete' => array
  85.             (
  86.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['delete'],
  87.                 'href'                => 'act=delete',
  88.                 'icon'                => 'delete.gif',
  89.                 'attributes'          => 'onclick="if (!confirm(\'' $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'
  90.             ),
  91.             'show' => array
  92.             (
  93.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['show'],
  94.                 'href'                => 'act=show',
  95.                 'icon'                => 'show.gif'
  96.             ),
  97.             'overlays' => array
  98.             (
  99.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['overlays'],
  100.                 'href'                => 'table=tl_c4g_map_overlays',
  101.                 'icon'                => 'bundles/con4gismaps/images/be-icons/overlays.png'
  102.             ),
  103.         )
  104.     ),
  105.     // Palettes
  106.     'palettes' => array
  107.     (
  108.         '__selector__'                => array('provider','osm_style','protect_baselayer','klokan_type'),
  109.         'default'                     => '{general_legend},name,display_name,provider,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  110.                                          '{protection_legend:hide},protect_baselayer;',
  111.         'osm'                         => '{general_legend},name,display_name,provider,osm_style,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  112.                                          '{protection_legend:hide},protect_baselayer;',
  113.         'mapbox'                      => '{general_legend},name,display_name,provider,mapbox_type,app_id,api_key,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  114.                                          '{protection_legend:hide},hide_in_be,protect_baselayer;',
  115.         'here'                        => '{general_legend},name,display_name,provider,here_type,app_id,api_key,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  116.                                          '{protection_legend:hide},hide_in_be,protect_baselayer;',
  117.         'thunder'                     => '{general_legend},name,display_name,provider,thunderforest_type,api_key,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  118.                                          '{protection_legend:hide},hide_in_be,protect_baselayer;',
  119. //        'google'                      => '{general_legend},name,display_name,provider,google_style,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  120. //                                         '{protection_legend:hide},protect_baselayer;',
  121.         'bing'                        => '{general_legend},name,display_name,provider,bing_style,bing_key,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  122.                                          '{protection_legend:hide},protect_baselayer;',
  123.         'klokan'                      => '{general_legend},name,display_name,provider,klokan_type,url,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  124.                                          '{protection_legend:hide},protect_baselayer;',
  125.         'wms'                         => '{general_legend},name,display_name,provider,wms_url,wms_params_layers,wms_params_version,wms_params_format,wms_params_transparent,wms_gutter,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  126.                                          '{protection_legend:hide},protect_baselayer;',
  127.         'owm'                         => '{general_legend},name,display_name,provider,app_id,api_key,attribution,minzoomlevel,maxzoomlevel;{cesium_legend:hide},cesium;'.
  128.                                          '{protection_legend:hide},protect_baselayer;',
  129.     ),
  130.     // Subpalettes
  131.     'subpalettes' => array
  132.     (
  133.         'protect_baselayer' => 'permitted_groups',
  134.         'osm_style_Mapnik' => '',
  135.         'osm_style_CycleMap' => '',
  136.         'osm_style_German' => '',
  137.         'osm_style_GermanTransport' => '',
  138.         'osm_style_TransportMap' => '',
  139.         'osm_style_LandscapeMap' => '',
  140.         //'osm_style_MapQuestOpen' => '',
  141.         'osm_style_Toner'=> '',
  142.         'osm_style_Terrain'=> '',
  143.         'osm_style_Watercolor'=> '',
  144.         'osm_style_osm_custom' => 'osm_style_url1,osm_style_url2,osm_style_url3,osm_style_url4,osm_keyname',
  145.         'klokan_type_OpenMapTiles' => 'style_url',
  146.         'klokan_type_basic'      => 'api_key',
  147.         'klokan_type_bright'      => 'api_key',
  148.         'klokan_type_darkmatter'      => 'api_key',
  149.         'klokan_type_positron'      => 'api_key',
  150.         'klokan_type_voyager'      => 'api_key',
  151.         'klokan_type_streets'      => 'api_key',
  152.         'klokan_type_topo'      => 'api_key',
  153.         'klokan_type_hybrid'      => 'api_key',
  154.     ),
  155.     // Fields
  156.     'fields' => array
  157.     (
  158.         'id' => array
  159.         (
  160.             'sql'                     => "int(10) unsigned NOT NULL auto_increment"
  161.         ),
  162.         'pid' => array
  163.         (
  164.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  165.         ),
  166.         'sorting' => array
  167.         (
  168.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  169.         ),
  170.         'tstamp' => array
  171.         (
  172.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  173.         ),
  174.         'name' => array
  175.         (
  176.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['name'],
  177.             'exclude'                 => true,
  178.             'search'                  => true,
  179.             'sorting'                 => true,
  180.             'filter'                  => true,
  181.             'flag'                    => 1,
  182.             'inputType'               => 'text',
  183.             'eval'                    => array('mandatory'=>true'maxlength'=>254'tl_class'=>'w50'),
  184.             'sql'                     => "varchar(254) NOT NULL default ''"
  185.         ),
  186.         'display_name' => array
  187.         (
  188.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['display_name'],
  189.             'exclude'                 => true,
  190.             'search'                  => true,
  191.             'inputType'               => 'text',
  192.             'eval'                    => array('maxlength'=>254'tl_class'=>'w50'),
  193.             'sql'                     => "varchar(254) NOT NULL default ''"
  194.         ),
  195.         'provider' => array
  196.         (
  197.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider'],
  198.             'filter'                  => true,
  199.             'inputType'               => 'select',
  200.             'default'                 => 'osm',
  201.             'options'                 => array('osm' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm'],
  202.                                                'mapbox' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_mapbox'],
  203.                                                'here' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here'],
  204.                                                'thunder' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest'],
  205.                                                //'google' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_google'],
  206.                                                'bing' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_bing'],
  207.                                                'klokan' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan'],
  208.                                                'wms' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_wms'],
  209.                                               ),
  210.             'eval'                    => array('submitOnChange'=>true'tl_class'=>'clr'),
  211.             'sql'                     => "varchar(10) NOT NULL default ''"
  212.         ),
  213.         'osm_style' => array
  214.         (
  215.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['osm_style'],
  216.             'filter'                  => false,
  217.             'inputType'               => 'select',
  218.             'default'                 => 'Mapnik',
  219.             'options'                 => array('Mapnik'          => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_mapnik'],
  220.                                                #'CycleMap'        => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_cycle'],
  221.                                                'German'          => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_german'],
  222.                                                'GermanTransport' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_german_transport'],
  223.                                                #'TransportMap'    => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_transport'],
  224.                                                #'LandscapeMap'    => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_landscape'],
  225.                                                // 'MapQuestOpen'    => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_mapquestopen'],
  226.                                                'Toner'           => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_toner'],
  227.                                                'Terrain'         => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_terrain'],
  228.                                                'Watercolor'      => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_watercolor'],
  229.                                                'osm_custom'      => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_osm_custom']
  230.                                                ),
  231.             'eval'                    => array('submitOnChange'=>true'tl_class'=>'clr'),
  232.             'sql'                     => "varchar(30) NOT NULL default ''"
  233.         ),
  234.         'osm_style_url1' => array
  235.         (
  236.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['osm_style_url1'],
  237.             'filter'                  => false,
  238.             'inputType'               => 'text',
  239.             'eval'                    => array('decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  240.             'sql'                     => "varchar(255) NOT NULL default ''"
  241.         ),
  242.         'osm_style_url2' => array
  243.         (
  244.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['osm_style_url2'],
  245.             'filter'                  => false,
  246.             'inputType'               => 'text',
  247.             'eval'                    => array('decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  248.             'sql'                     => "varchar(255) NOT NULL default ''"
  249.         ),
  250.         'osm_style_url3' => array
  251.         (
  252.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['osm_style_url3'],
  253.             'filter'                  => false,
  254.             'inputType'               => 'text',
  255.             'eval'                    => array('decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  256.             'sql'                     => "varchar(255) NOT NULL default ''"
  257.         ),
  258.         'osm_style_url4' => array
  259.         (
  260.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['osm_style_url4'],
  261.             'filter'                  => false,
  262.             'inputType'               => 'text',
  263.             'eval'                    => array('decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  264.             'sql'                     => "varchar(255) NOT NULL default ''"
  265.         ),
  266.         'osm_keyname' => array
  267.         (
  268.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['osm_keyname'],
  269.             'filter'                  => false,
  270.             'inputType'               => 'text',
  271.             'eval'                    => array('maxlength'=>30),
  272.             'sql'                     => "varchar(30) NOT NULL default ''"
  273.         ),
  274.         'mapbox_type' => array
  275.         (
  276.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['mapbox_type'],
  277.             'filter'                  => false,
  278.             'inputType'               => 'select',
  279.             'default'                 => 'Mapbox',
  280.             'options'                 => array(
  281.                 'Mapbox'              => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_mapbox'],
  282.                 'MapboxClassic'       => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_mapbox_classic'],
  283.             ),
  284.             'eval'                    => array('submitOnChange' => true),
  285.             'sql'                     => "varchar(30) NOT NULL default ''"
  286.         ),
  287.         'klokan_type' => array
  288.         (
  289.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['klokan_type'],
  290.             'filter'                  => false,
  291.             'inputType'               => 'select',
  292.             'default'                 => 'OpenMapTiles',
  293.             'options'                 => array(
  294.                 'OpenMapTiles'        => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_openmaptiles'],
  295.                 'basic'               => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_basic'],
  296.                 'bright'              => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_bright'],
  297.                 'darkmatter'          => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_darkmatter'],
  298.                 'positron'            => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_positron'],
  299.                 'voyager'             => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_voyager'],
  300.                 'streets'             => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_streets'],
  301.                 'topo'                => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_topo'],
  302.                 'hybrid'              => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_klokan_tilehosting_hybrid'],
  303.             ),
  304.             'eval'                    => array('submitOnChange' => true),
  305.             'sql'                     => "varchar(30) NOT NULL default ''"
  306.         ),
  307.         'style_url' => array
  308.         (
  309.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['style_url'],
  310.             'inputType'               => 'text',
  311.             'default'                 => 'dark-matter',
  312.             'sql'                     => "varchar(30) NOT NULL default ''"
  313.         ),
  314.         'here_type' => array
  315.         (
  316.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['here_type'],
  317.             'filter'                  => false,
  318.             'inputType'               => 'select',
  319.             'default'                 => 'normal',
  320.             'options'                 => array(
  321.                 'normal'              => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here_normal'],
  322.                 'transit'             => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here_transit'],
  323.                 'pedestrian'          => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here_pedestrian'],
  324.                 'terrain'             => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here_terrain'],
  325.                 'satellite'           => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here_satellite'],
  326.                 'hybrid'              => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_here_hybrid'],
  327.             ),
  328.             'eval'                    => array('submitOnChange' => false),
  329.             'sql'                     => "varchar(30) NOT NULL default ''"
  330.         ),
  331.         'thunderforest_type' => array
  332.         (
  333.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['thunderforest_type'],
  334.             'filter'                  => false,
  335.             'inputType'               => 'select',
  336.             'default'                 => 'cycle',
  337.             'options'                 => array(
  338.                 'cycle'               => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_opencyclemap'],
  339.                 'transport'           => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_transport'],
  340.                 'landscape'           => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_landscape'],
  341.                 'outdoors'            => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_outdoors'],
  342.                 'transport-dark'      => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_transport_dark'],
  343.                 'spinal-map'          => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_spinal_map'],
  344.                 'pioneer'             => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_pioneer'],
  345.                 'mobile-atlas'        => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_mobile_atlas'],
  346.                 'neighbourhood'       => $GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_thunderforest_neighbourhood'],
  347.             ),
  348.             'eval'                    => array('submitOnChange' => false),
  349.             'sql'                     => "varchar(30) NOT NULL default ''"
  350.         ),
  351.         'google_style' => array
  352.         (
  353.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['google_style'],
  354.             'filter'                  => false,
  355.             'inputType'               => 'select',
  356.             'default'                 => 'streets',
  357.             'options'                 => array('streets' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_google_streets'],
  358.                                                'hybrid' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_google_hybrid'],
  359.                                                'satellite' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_google_satellite'],
  360.                                                'terrain' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_google_terrain']
  361.                                               ),
  362.             'sql'                     => "varchar(30) NOT NULL default ''"
  363.         ),
  364.         'bing_style' => array
  365.         (
  366.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['bing_style'],
  367.             'filter'                  => false,
  368.             'inputType'               => 'select',
  369.             'default'                 => 'Shaded',
  370.             'options'                 => array('Road' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_bing_road'],
  371.                                                'AerialWithLabels' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_bing_hybrid'],
  372.                                                'Aerial' => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['provider_bing_aerial']
  373.                                               ),
  374.             'sql'                     => "varchar(30) NOT NULL default ''"
  375.         ),
  376.         'bing_key' => array
  377.         (
  378.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['bing_key'],
  379.             'filter'                  => false,
  380.             'inputType'               => 'text',
  381.             'eval'                    => array('decodeEntities'=>true'maxlength'=>100'tl_class'=>'long''mandatory'=>'true'),
  382.             'sql'                     => "varchar(100) NOT NULL default ''"
  383.         ),
  384.         'attribution' => array
  385.         (
  386.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['attribution'],
  387.             'filter'                  => false,
  388.             'inputType'               => 'text',
  389.             'eval'                    => array('maxlength'=>255'tl_class'=>'long clr''allowHtml' => true),
  390.             'sql'                     => "varchar(255) NOT NULL default ''"
  391.         ),
  392.         'wms_url' => array
  393.         (
  394.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_url'],
  395.             'filter'                  => false,
  396.             'inputType'               => 'text',
  397.             'eval'                    => array('maxlength'=>255'tl_class'=>'long''allowHtml' => true),
  398.             'sql'                     => "varchar(255) NOT NULL default ''"
  399.         ),
  400.         'wms_params_layers' => array
  401.         (
  402.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_params_layers'],
  403.             'filter'                  => false,
  404.             'inputType'               => 'text',
  405.             'eval'                    => array('maxlength'=>255'tl_class'=>'w50''allowHtml' => true),
  406.             'sql'                     => "varchar(255) NOT NULL default ''"
  407.         ),
  408.         'wms_params_version' => array
  409.         (
  410.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_params_version'],
  411.             'filter'                  => false,
  412.             'inputType'               => 'text',
  413.             'eval'                    => array('maxlength'=>255'tl_class'=>'w50''allowHtml' => true),
  414.             'sql'                     => "varchar(255) NOT NULL default ''"
  415.         ),
  416.         'wms_params_format' => array
  417.         (
  418.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_params_format'],
  419.             'filter'                  => false,
  420.             'inputType'               => 'text',
  421.             'eval'                    => array('maxlength'=>255'tl_class'=>'w50''allowHtml' => true),
  422.             'sql'                     => "varchar(255) NOT NULL default ''"
  423.         ),
  424.         'wms_params_transparent' => array
  425.         (
  426.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_params_transparent'],
  427.             'exclude'                 => true,
  428.             'default'                 => false,
  429.             'inputType'               => 'checkbox',
  430.             'eval'                    => array('submitOnChange' => false'tl_class'=>'w50 m12'),
  431.             'sql'                     => "char(1) NOT NULL default ''"
  432.         ),
  433.         'wms_params_srs' => array
  434.         (
  435.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_params_srs'],
  436.             'filter'                  => false,
  437.             'inputType'               => 'text',
  438.             'eval'                    => array('maxlength'=>255'tl_class'=>'w50''allowHtml' => true),
  439.             'sql'                     => "varchar(255) NOT NULL default ''"
  440.         ),
  441.         'wms_gutter' => array
  442.         (
  443.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['wms_gutter'],
  444.             'filter'                  => false,
  445.             'inputType'               => 'text',
  446.             'eval'                    => array('maxlength'=>255'tl_class'=>'w50''allowHtml' => true),
  447.             'sql'                     => "varchar(255) NOT NULL default ''"
  448.         ),
  449.         'minzoomlevel' => array
  450.         (
  451.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['minzoomlevel'],
  452.             'filter'                  => false,
  453.             'inputType'               => 'text',
  454.             'default'                 => '0',
  455.             'eval'                    => array( 'tl_class'=>'w50''rgxp'=>'digit'),
  456.             'sql'                     => "int(10) NOT NULL default '0'"
  457.         ),
  458.         'maxzoomlevel' => array
  459.         (
  460.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['maxzoomlevel'],
  461.             'filter'                  => false,
  462.             'inputType'               => 'text',
  463.             'default'                 => '19',
  464.             'eval'                    => array( 'tl_class'=>'w50''rgxp'=>'digit'),
  465.             'sql'                     => "int(10) NOT NULL default '19'"
  466.         ),
  467.         'protect_baselayer' => array
  468.         (
  469.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['protect_baselayer'],
  470.             'exclude'                 => true,
  471.             'default'                 => false,
  472.             'inputType'               => 'checkbox',
  473.             'eval'                    => array('submitOnChange' => true),
  474.             'sql'                     => "char(1) NOT NULL default ''"
  475.         ),
  476.         'hide_in_be' => array
  477.         (
  478.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['hide_in_be'],
  479.             'exclude'                 => true,
  480.             'default'                 => false,
  481.             'inputType'               => 'checkbox',
  482.             'eval'                    => array('submitOnChange' => true),
  483.             'sql'                     => "char(1) NOT NULL default ''"
  484.         ),
  485.         'permitted_groups' => array
  486.         (
  487.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['permitted_groups'],
  488.             'exclude'                 => true,
  489.             'inputType'               => 'checkbox',
  490.             'foreignKey'              => 'tl_member_group.name',
  491.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  492.             'sql'                     => "blob NULL"
  493.         ),
  494.         'url' => array
  495.         (
  496.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['url'],
  497.             'filter'                  => false,
  498.             'inputType'               => 'text',
  499.             'eval'                    => array('decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  500.             'sql'                     => "varchar(255) NOT NULL default ''"
  501.         ),
  502.         'api_key' => array
  503.         (
  504.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['api_key'],
  505.             'filter'                  => false,
  506.             'inputType'               => 'text',
  507.             'eval'                    => array('decodeEntities'=>true'maxlength'=>100'tl_class'=>'long''mandatory'=>'true'),
  508.             'sql'                     => "varchar(100) NOT NULL default ''"
  509.         ),
  510.         'app_id' => array
  511.         (
  512.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['app_id'],
  513.             'filter'                  => false,
  514.             'inputType'               => 'text',
  515.             'eval'                    => array('decodeEntities'=>true'maxlength'=>100'tl_class'=>'long''mandatory'=>'true'),
  516.             'sql'                     => "varchar(100) NOT NULL default ''"
  517.         ),
  518.         'cesium' => array
  519.         (
  520.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_baselayers']['cesium'],
  521.             'exclude'                 => true,
  522.             'default'                 => '',
  523.             'inputType'               => 'checkbox',
  524.             'eval'                    => array(),
  525.             'sql'                     => "char(1) NOT NULL default ''"
  526.         ),
  527.     )
  528. );
  529. /**
  530.  * Class tl_c4g_map_baselayers
  531.  */
  532. class tl_c4g_map_baselayers extends Backend
  533. {
  534.     public function pasteElement(DataContainer $dc$row$table$cr$arrClipboard=null)
  535.     {
  536.         if ($row['id'] > 0) {
  537.             $imagePasteAfter Image::getHtml('pasteafter.gif'sprintf($GLOBALS['TL_LANG'][$table]['pasteafter'][1], $row['id']));
  538.             return '<a href="'.$this->addToUrl('act='.$arrClipboard["mode"].'&mode=1&childs=1&pid='.$row['id']).'" title="'.
  539.             specialchars(sprintf($GLOBALS['TL_LANG'][$table]['pasteafter'][1], $row['id'])).'" onclick="Backend.getScrollOffset()">'.$imagePasteAfter.'</a> ';
  540.         } else {
  541.             $imagePasteInto Image::getHtml('pasteinto.gif'sprintf($GLOBALS['TL_LANG'][$table]['pasteinto'][1], $row['id']));
  542.             return '<a href="'.$this->addToUrl('act='.$arrClipboard["mode"].'&mode=2&childs=1&pid='.$row['id']).'" title="'.
  543.             specialchars(sprintf($GLOBALS['TL_LANG'][$table]['pasteafter'][1], $row['id'])).'" onclick="Backend.getScrollOffset()">'.$imagePasteInto.'</a> ';
  544.         }
  545.     }
  546.     public function addIcon($row$labelDataContainer $dc=null$imageAttribute=''$blnReturnImage=false$blnProtected=false)
  547.     {
  548.         return \Image::getHtml('bundles/con4gismaps/images/be-icons/baselayers.png'''$imageAttribute).' '.$label;
  549.     }
  550. }