3 namespace Drupal\entity_module_bundle_plugin_test;
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
10 * Manages discovery and instantiation of BundlePluginTest plugins.
12 * @see \Drupal\entity_module_bundle_plugin_test\Annotation\BundlePluginTest
15 class BundlePluginTestManager extends DefaultPluginManager {
18 * Constructs a new BundlePluginTestManager object.
20 * @param \Traversable $namespaces
21 * An object that implements \Traversable which contains the root paths
22 * keyed by the corresponding namespace to look for plugin implementations.
23 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
25 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
28 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
29 parent::__construct('Plugin/BundlePluginTest', $namespaces, $module_handler, 'Drupal\entity_module_bundle_plugin_test\Plugin\BundlePluginTest\BundlePluginTestInterface', 'Drupal\entity_module_bundle_plugin_test\Annotation\BundlePluginTest');
31 $this->alterInfo('bundle_plugin_test_info');
32 $this->setCacheBackend($cache_backend, 'bundle_plugin_test_plugins');