Refactor LayerCallbacks using dependency injection.

This commit is contained in:
David Molineus
2016-10-06 08:26:45 +02:00
parent ea359e8b79
commit 4068f62df1
3 changed files with 44 additions and 25 deletions

View File

@@ -178,7 +178,9 @@ $container['leaflet.dca.layer-callbacks'] = $container->share(
return new LayerCallbacks(
$container[Services::DCA_MANAGER],
$container[Services::DATABASE_CONNECTION],
$GLOBALS['LEAFLET_LAYERS']
$container[Services::TRANSLATOR],
$GLOBALS['LEAFLET_LAYERS'],
$GLOBALS['LEAFLET_TILE_PROVIDERS']
);
}
);

View File

@@ -124,4 +124,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][1] = 'Basic lay
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['feature'][0] = 'Feature group';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['feature'][1] = 'Extended layer group with events and popup support. <br>See <a href="http://leafletjs.com/reference.html#featuregroup" target="_blank">http://leafletjs.com/reference.html#featuregroup</a>';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteinto'][1] = 'Paste into layer %s';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteafter'][1] = 'Paste after layer %s';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['countEntries'] = 'Entries';