You are here

ProviderPluginManager.php in Synonyms 2.0.x

Namespace

Drupal\synonyms

File

src/ProviderPluginManager.php
View source
<?php

namespace Drupal\synonyms;

use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\synonyms\Annotation\Provider;
use Drupal\synonyms\ProviderInterface\ProviderInterface;

/**
 * Plugin manager for Synonyms provider plugin type.
 */
class ProviderPluginManager extends DefaultPluginManager {

  /**
   * {@inheritdoc}
   */
  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
    parent::__construct('Plugin/Synonyms/Provider', $namespaces, $module_handler, ProviderInterface::class, Provider::class);
    $this
      ->alterInfo('synonyms_provider_info');
    $this
      ->setCacheBackend($cache_backend, 'synonyms_provider_info_plugins');
  }

}

Classes

Namesort descending Description
ProviderPluginManager Plugin manager for Synonyms provider plugin type.