You are here

public function UiPatternsManager::__construct in UI Patterns 8

UiPatternsManager constructor.

Overrides DefaultPluginManager::__construct

File

src/UiPatternsManager.php, line 38

Class

UiPatternsManager
Provides the default ui_patterns manager.

Namespace

Drupal\ui_patterns

Code

public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, CacheBackendInterface $cache_backend) {
  parent::__construct('Plugin/UiPatterns/Pattern', $namespaces, $module_handler, 'Drupal\\ui_patterns\\Plugin\\PatternInterface', 'Drupal\\ui_patterns\\Annotation\\UiPattern');
  $this->moduleHandler = $module_handler;
  $this->themeHandler = $theme_handler;
  $this
    ->alterInfo('ui_patterns_info');
  $this
    ->setCacheBackend($cache_backend, 'ui_patterns', [
    'ui_patterns',
  ]);
}