You are here

public function ParagraphsBehaviorManager::__construct in Paragraphs 8

Constructs a ParagraphsBehaviorManager 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.

Overrides DefaultPluginManager::__construct

File

src/ParagraphsBehaviorManager.php, line 27

Class

ParagraphsBehaviorManager
Plugin type manager for paragraphs type behavior plugins.

Namespace

Drupal\paragraphs

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/paragraphs/Behavior', $namespaces, $module_handler, 'Drupal\\paragraphs\\ParagraphsBehaviorInterface', 'Drupal\\paragraphs\\Annotation\\ParagraphsBehavior');
  $this
    ->setCacheBackend($cache_backend, 'paragraphs_behavior_plugins');
  $this
    ->alterInfo('paragraphs_behavior_info');
}