You are here

public function WorkflowManager::__construct in State Machine 8

Constructs a new WorkflowManager object.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

\Drupal\state_machine\WorkflowGroupManagerInterface $group_manager: The workflow group manager.

Overrides DefaultPluginManager::__construct

File

src/WorkflowManager.php, line 58

Class

WorkflowManager
Manages discovery and instantiation of workflow plugins.

Namespace

Drupal\state_machine

Code

public function __construct(ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, WorkflowGroupManagerInterface $group_manager) {
  $this->moduleHandler = $module_handler;
  $this
    ->setCacheBackend($cache_backend, 'workflow', [
    'workflow',
  ]);
  $this->groupManager = $group_manager;
  $this
    ->alterInfo('workflows');
}