You are here

public function BreadcrumbTitleResolverManager::__construct in Breadcrumb Manager 8

Constructs a new BreadcrumbTitleResolverManager 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.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

Overrides DefaultPluginManager::__construct

File

src/Plugin/BreadcrumbTitleResolverManager.php, line 31

Class

BreadcrumbTitleResolverManager
Provides the Breadcrumb title resolver plugin manager.

Namespace

Drupal\breadcrumb_manager\Plugin

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory) {
  parent::__construct('Plugin/BreadcrumbTitleResolver', $namespaces, $module_handler, 'Drupal\\breadcrumb_manager\\Plugin\\BreadcrumbTitleResolverInterface', 'Drupal\\breadcrumb_manager\\Annotation\\BreadcrumbTitleResolver');
  $this->config = $config_factory
    ->get('breadcrumb_manager.config');
  $this
    ->alterInfo('breadcrumb_manager_breadcrumb_title_resolver_info');
  $this
    ->setCacheBackend($cache_backend, 'breadcrumb_manager_breadcrumb_title_resolver_plugins');
}