forked from Snck3rs/contao-leaflet-maps
Use dependency injection for the provider layer mapper.
This commit is contained in:
@@ -40,11 +40,11 @@ class ProviderLayerMapper extends AbstractLayerMapper
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
* @param array $providers Registered providers.
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct(array $providers)
|
||||
{
|
||||
$this->providers = &$GLOBALS['LEAFLET_TILE_PROVIDERS'];
|
||||
$this->providers = $providers;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user