You are here

public function LingotekLanguageForm::__construct in Lingotek Translation 3.4.x

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

Constructs a new LingotekLanguageForm object.

Parameters

\Drupal\lingotek\LingotekInterface $lingotek: A lingotek object.

\Drupal\lingotek\LanguageLocaleMapperInterface $language_locale_mapper: The language-locale mapper.

\Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_configuration: The Lingotek configuration service.

File

src/Form/LingotekLanguageForm.php, line 55

Class

LingotekLanguageForm
Alters the Drupal language module language forms.

Namespace

Drupal\lingotek\Form

Code

public function __construct(LingotekInterface $lingotek, LanguageLocaleMapperInterface $language_locale_mapper, LingotekConfigurationServiceInterface $lingotek_configuration = NULL) {
  $this->lingotek = $lingotek;
  $this->languageLocaleMapper = $language_locale_mapper;
  if (!$lingotek_configuration) {
    @trigger_error('The lingotek.configuration service must be passed to LingotekLanguageForm::__construct, it is required before Lingotek 4.0.0.', E_USER_DEPRECATED);
    $lingotek_configuration = \Drupal::service('lingotek.configuration');
  }
  $this->lingotekConfiguration = $lingotek_configuration;
}