Load language file in the onload callback.

This commit is contained in:
David Molineus
2017-10-06 14:38:43 +02:00
parent 47713e8a38
commit b82b010937
5 changed files with 19 additions and 13 deletions

View File

@@ -25,11 +25,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'alias' => 'unique',
],
],
'onload_callback' => [
function () {
\Controller::loadLanguageFile('leaflet');
},
],
'onload_callback' => array(
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'loadLanguageFile'],
),
'onsubmit_callback' => [
['netzmacht.contao_leaflet_maps.listeners.dca.leaflet', 'clearCache'],
],