public function LingotekWorkbenchModerationHandler::__construct in Lingotek Translation 3.1.x
Same name and namespace in other branches
- 8.2 src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 4.0.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.2.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.3.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.4.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.5.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.6.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.7.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
- 3.8.x src/Moderation/LingotekWorkbenchModerationHandler.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationHandler::__construct()
Constructs a new LingotekWorkbenchModerationHandler object.
Parameters
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\lingotek\Moderation\LingotekModerationConfigurationServiceInterface $moderation_configuration: A Lingotek moderation configuration service.
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container from which optional services can be requested.
File
- src/
Moderation/ LingotekWorkbenchModerationHandler.php, line 53
Class
- LingotekWorkbenchModerationHandler
- Workbench moderation handler managing the Lingotek integration.
Namespace
Drupal\lingotek\ModerationCode
public function __construct(ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, LingotekModerationConfigurationServiceInterface $moderation_configuration, ContainerInterface $container) {
$this
->setModuleHandler($module_handler);
$this->entityTypeManager = $entity_type_manager;
$this->moderationConfiguration = $moderation_configuration;
// We need a service we cannot depend on, as it may not exist if the module
// is not present. Ignore the error.
if ($container
->has('workbench_moderation.moderation_information')) {
$this->moderationInfo = $container
->get('workbench_moderation.moderation_information');
}
}