src/Sulu/Bundle/LocationBundle/DependencyInjection/SuluLocationExtension.php
private function configureMapManager($config, ContainerBuilder $container)
    {
        $mapManager = $container->getDefinition('sulu_location.map_manager');

        foreach ($config['enabled_providers'] as $enabledProviderName) {
            $providerConfig = $config['providers'][$enabledProviderName];
            $mapManager->addMethodCall('registerProvider', [
                $enabledProviderName,
                $providerConfig,
            ]);
        }

        foreach ($config['geolocators'] as $geoLocatorName => $geoLocatorOptions) {
            $mapManager->addMethodCall('registerGeolocator', [
                $geoLocatorName,
                $geoLocatorOptions,
            ]);
        }

        $mapManager->addMethodCall('setDefaultProviderName', [$config['default_provider']]);
    }
private function configureMapManager($config, ContainerBuilder $container)
    {
        $mapManager = $container->getDefinition('sulu_location.map_manager');

        foreach ($config['enabled_providers'] as $enabledProviderName) {
            $providerConfig = $config['providers'][$enabledProviderName];
            $mapManager->addMethodCall('registerProvider', [
                $enabledProviderName,
                $providerConfig,
            ]);
        }

        foreach ($config['geolocators'] as $geoLocatorName => $geoLocatorOptions) {
            $mapManager->addMethodCall('registerGeolocator', [
                $geoLocatorName,
                $geoLocatorOptions,
            ]);
        }

        $mapManager->addMethodCall('setDefaultProviderName', [$config['default_provider']]);
    }
private function configureMapManager ( $ config , ContainerBuilder $ container ) { $ mapManager = $ container -> getDefinition ( 'sulu_location.map_manager' ) ; foreach ( $ config [ 'enabled_providers' ] as $ enabledProviderName ) { $ providerConfig = $ config [ 'providers' ] [ $ enabledProviderName ] ; $ mapManager -> addMethodCall ( 'registerProvider' , [ $ enabledProviderName , $ providerConfig , ] ) ; } foreach ( $ config [ 'geolocators' ] as $ geoLocatorName => $ geoLocatorOptions ) { $ mapManager -> addMethodCall ( 'registerGeolocator' , [ $ geoLocatorName , $ geoLocatorOptions , ] ) ; } $ mapManager -> addMethodCall ( 'setDefaultProviderName' , [ $ config [ 'default_provider' ] ] ) ; }
Configure the map manager - register the providers and geolocators
with the map manager class.

@param array $config - Resolved configuration
@param ContainerBuilder
Configure the map manager - register the providers and geolocators with the map manager class .