public function ProviderPluginManager::__construct in Geocoder 8.2
Same name and namespace in other branches
- 8.3 src/ProviderPluginManager.php \Drupal\geocoder\ProviderPluginManager::__construct()
Constructs a new geocoder provider plugin manager.
Parameters
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations,.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend to use.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Utility\LinkGeneratorInterface $link_generator: The Link Generator service.
Overrides DefaultPluginManager::__construct
File
- src/
ProviderPluginManager.php, line 63
Class
- ProviderPluginManager
- Provides a plugin manager for geocoder providers.
Namespace
Drupal\geocoderCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation, RendererInterface $renderer, LinkGeneratorInterface $link_generator) {
parent::__construct('Plugin/Geocoder/Provider', $namespaces, $module_handler, ProviderInterface::class, GeocoderProvider::class);
$this
->alterInfo('geocoder_provider_info');
$this
->setCacheBackend($cache_backend, 'geocoder_provider_plugins');
$this->config = $config_factory
->get('geocoder.settings');
$this->stringTranslation = $string_translation;
$this->renderer = $renderer;
$this->link = $link_generator;
}