You are here

public function LingotekSettingsTabConfigurationForm::__construct in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 8 src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  2. 4.0.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  3. 3.0.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  4. 3.1.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  5. 3.2.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  6. 3.3.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  7. 3.4.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  8. 3.5.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  9. 3.6.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  10. 3.7.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()
  11. 3.8.x src/Form/LingotekSettingsTabConfigurationForm.php \Drupal\lingotek\Form\LingotekSettingsTabConfigurationForm::__construct()

Constructs a new LingotekManagementForm object.

Parameters

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

$entity_query: (deprecated) The entity query factory.

\Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_config: The Lingotek config service.

\Drupal\lingotek\LingotekConfigTranslationServiceInterface $translation_service: The Lingotek config translation service.

\Drupal\config_translation\ConfigMapperInterface[] $mappers: The configuration mapper manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Overrides LingotekConfigFormBase::__construct

File

src/Form/LingotekSettingsTabConfigurationForm.php, line 96

Class

LingotekSettingsTabConfigurationForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

public function __construct(LanguageManagerInterface $language_manager, $entity_query, LingotekConfigurationServiceInterface $lingotek_config, LingotekConfigTranslationServiceInterface $translation_service, array $mappers, EntityTypeManagerInterface $entity_type_manager = NULL) {
  $this->languageManager = $language_manager;
  if (get_class($entity_query) === '\\Drupal\\Core\\Entity\\Query\\QueryFactory') {
    @trigger_error('The entity.query service is deprecated. Pass the entity_type.manager service to LingotekSettingsTabConfigurationForm::__construct instead. It is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
  }
  $this->lingotekConfig = $lingotek_config;
  $this->translationService = $translation_service;
  $this->mappers = $mappers;
  if (!$entity_type_manager) {
    @trigger_error('The entity_type.manager service must be passed to LingotekSettingsTabConfigurationForm::__construct, it is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
    $entity_type_manager = \Drupal::service('entity_type.manager');
  }
  $this->entityTypeManager = $entity_type_manager;
}