public function LingotekContentModerationSettingsForm::__construct in Lingotek Translation 8.2
Same name and namespace in other branches
- 4.0.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.0.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.1.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.2.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.3.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.4.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.5.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.6.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.7.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
- 3.8.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::__construct()
Constructs a new LingotekContentModerationSettingsForm 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.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container from which optional services can be requested.
\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator.
File
- src/
Moderation/ LingotekContentModerationSettingsForm.php, line 76
Class
- LingotekContentModerationSettingsForm
- Moderation settings form for the Lingotek content_moderation integration.
Namespace
Drupal\lingotek\ModerationCode
public function __construct(ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, LingotekModerationConfigurationServiceInterface $moderation_configuration, EntityTypeBundleInfoInterface $entity_type_bundle_info, ContainerInterface $container, UrlGeneratorInterface $url_generator = NULL) {
$this
->setModuleHandler($module_handler);
$this->entityTypeManager = $entity_type_manager;
$this->moderationConfiguration = $moderation_configuration;
$this->entityTypeBundleInfo = $entity_type_bundle_info;
// 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('content_moderation.moderation_information')) {
$this->moderationInfo = $container
->get('content_moderation.moderation_information');
}
if (!$url_generator) {
@trigger_error('The url_generator service must be passed to LingotekContentModerationSettingsForm::__construct, it is required before Lingotek 9.x-1.0.', E_USER_DEPRECATED);
$url_generator = \Drupal::service('url_generator');
}
$this->urlGenerator = $url_generator;
}