Rework validator callbacks to a listener service.

This commit is contained in:
David Molineus
2017-10-06 14:02:31 +02:00
parent 6c7b136c0e
commit f03ed713f3
10 changed files with 23 additions and 31 deletions

View File

@@ -180,7 +180,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
['title'],
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
),
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateAlias')
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias']
),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => 'varchar(255) NULL'
@@ -191,7 +191,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'exclude' => true,
'inputType' => 'text',
'save_callback' => array(
\Netzmacht\Contao\Leaflet\Dca\Validator::callback('validateCoordinates'),
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateCoordinates'],
),
'wizard' => array(
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'getGeocoder']