You are here

public function LeafletTileLayerPluginManager::__construct in Geofield Map 8

Constructs a new leafletTileLayersPluginManager object.

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: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

Overrides DefaultPluginManager::__construct

File

src/LeafletTileLayer/LeafletTileLayerPluginManager.php, line 35

Class

LeafletTileLayerPluginManager
Provides the Leaflet tile layers plugin plugin manager.

Namespace

Drupal\geofield_map\leafletTileLayer

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, RequestStack $request_stack) {
  parent::__construct('Plugin/LeafletTileLayerPlugin', $namespaces, $module_handler, 'Drupal\\geofield_map\\LeafletTileLayer\\LeafletTileLayerPluginInterface', 'Drupal\\geofield_map\\Annotation\\LeafletTileLayerPlugin');
  $this
    ->alterInfo('geofield_map_leaflet_tile_layer_plugin_info');
  $this
    ->setCacheBackend($cache_backend, 'geofield_map_leaflet_tile_layer_plugin_plugins');
  $this->requestStack = $request_stack;
}