You are here

public function SectionStorageManager::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::__construct()

Constructs a new SectionStorageManager 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\Plugin\Context\ContextHandlerInterface $context_handler: The context handler.

Overrides DefaultPluginManager::__construct

File

core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php, line 45

Class

SectionStorageManager
Provides the Section Storage type plugin manager.

Namespace

Drupal\layout_builder\SectionStorage

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ContextHandlerInterface $context_handler) {
  parent::__construct('Plugin/SectionStorage', $namespaces, $module_handler, SectionStorageInterface::class, SectionStorage::class);
  $this->contextHandler = $context_handler;
  $this
    ->alterInfo('layout_builder_section_storage');
  $this
    ->setCacheBackend($cache_backend, 'layout_builder_section_storage_plugins');
}