You are here

public function MapThemerPluginManager::__construct in Geofield Map 8.2

Constructor of the a Geofield Map Themers 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 $translation_manager: The translation manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The entity manager.

Overrides DefaultPluginManager::__construct

File

src/MapThemerPluginManager.php, line 59

Class

MapThemerPluginManager
Provides a plugin manager for Geofield Map Themers.

Namespace

Drupal\geofield_map

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, TranslationInterface $translation_manager, EntityTypeManagerInterface $entity_manager) {
  parent::__construct('Plugin/GeofieldMapThemer', $namespaces, $module_handler, MapThemerInterface::class, MapThemer::class);
  $this
    ->alterInfo('geofield_map_themer_info');
  $this
    ->setCacheBackend($cache_backend, 'geofield_map_themer_plugins');
  $this->entityManager = $entity_manager;
  $this->geofieldMapSettings = $config_factory
    ->get('geofield_map.settings');
}