public function NamePluginManager::__construct in Plug 7
Constructs NamePluginManager.
Parameters
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\DrupalCacheInterface $cache_backend: Cache backend instance to use.
Overrides DefaultPluginManager::__construct
File
- modules/
plug_example/ src/ NamePluginManager.php, line 27 - Contains \Drupal\plug_example\NamePluginManager.
Class
- NamePluginManager
- Name plugin manager.
Namespace
Drupal\plug_exampleCode
public function __construct(\Traversable $namespaces, \DrupalCacheInterface $cache_backend) {
parent::__construct('Plugin/name', $namespaces, 'Drupal\\plug_example\\Plugin\\name\\NameInterface', '\\Drupal\\plug_example\\Annotation\\Name');
$this
->setCacheBackend($cache_backend, 'name_plugins');
$this
->alterInfo('name_plugin');
}