Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / workflows / src / WorkflowTypeManager.php
1 <?php
2
3 namespace Drupal\workflows;
4
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
8 use Drupal\workflows\Annotation\WorkflowType;
9
10 /**
11  * Provides a Workflow type plugin manager.
12  *
13  * @see \Drupal\workflows\Annotation\WorkflowType
14  * @see \Drupal\workflows\WorkflowTypeInterface
15  * @see plugin_api
16  */
17 class WorkflowTypeManager extends DefaultPluginManager {
18
19   /**
20    * Constructs a new class instance.
21    *
22    * @param \Traversable $namespaces
23    *   An object that implements \Traversable which contains the root paths
24    *   keyed by the corresponding namespace to look for plugin implementations.
25    * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
26    *   Cache backend instance to use.
27    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
28    *   The module handler to invoke the alter hook with.
29    */
30   public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
31     parent::__construct('Plugin/WorkflowType', $namespaces, $module_handler, WorkflowTypeInterface::class, WorkflowType::class);
32     $this->alterInfo('workflow_type_info');
33     $this->setCacheBackend($cache_backend, 'workflow_type_info', ['workflow_type_plugins']);
34   }
35
36 }