public function WorkflowManager::__construct in Workflow 8
Construct the WorkflowManager object as a service.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity_field manager service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity_type manager service.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
See also
File
- src/
Entity/ WorkflowManager.php, line 77
Class
- WorkflowManager
- Manages entity type plugin definitions.
Namespace
Drupal\workflow\EntityCode
public function __construct(ConfigFactoryInterface $config_factory, EntityFieldManagerInterface $entity_field_manager, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler, AccountInterface $current_user) {
$this->entityFieldManager = $entity_field_manager;
$this->entityTypeManager = $entity_type_manager;
$this->stringTranslation = $string_translation;
$this->userConfig = $config_factory
->get('user.settings');
$this->currentUser = $current_user;
$this->moduleHandler = $module_handler;
}