You are here

StyleguidePluginManager.php in Style Guide 8

Same filename and directory in other branches
  1. 2.x src/StyleguidePluginManager.php

Namespace

Drupal\styleguide

File

src/StyleguidePluginManager.php
View source
<?php

namespace Drupal\styleguide;

use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;

/**
 * The Styleguide plugins manager.
 */
class StyleguidePluginManager extends DefaultPluginManager {

  /**
   * {@inheritdoc}
   */
  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
    $subdir = 'Plugin/Styleguide';
    $plugin_interface = 'Drupal\\styleguide\\StyleguideInterface';
    $plugin_definition_annotation_name = 'Drupal\\Component\\Annotation\\Plugin';
    parent::__construct($subdir, $namespaces, $module_handler, $plugin_interface, $plugin_definition_annotation_name);
    $this
      ->alterInfo('styleguide_info');
    $this
      ->setCacheBackend($cache_backend, 'styleguide_info');
  }

}

Classes

Namesort descending Description
StyleguidePluginManager The Styleguide plugins manager.