You are here

public function LingotekDashboardController::__construct in Lingotek Translation 3.2.x

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

Constructs a LingotekDashboardController object.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The Request instance.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

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

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

\Drupal\lingotek\LingotekInterface $lingotek: The lingotek service.

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

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

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator.

Overrides LingotekControllerBase::__construct

File

src/Controller/LingotekDashboardController.php, line 69

Class

LingotekDashboardController
Returns responses for lingotek module setup routes.

Namespace

Drupal\lingotek\Controller

Code

public function __construct(Request $request, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, LingotekInterface $lingotek, LanguageLocaleMapperInterface $language_locale_mapper, LingotekConfigurationServiceInterface $lingotek_configuration, FormBuilderInterface $form_builder, LoggerInterface $logger, UrlGeneratorInterface $url_generator = NULL) {
  parent::__construct($request, $config_factory, $lingotek, $language_locale_mapper, $form_builder, $logger);
  $this->entityTypeManager = $entity_type_manager;
  $this->languageManager = $language_manager;
  $this->lingotek_configuration = $lingotek_configuration;
  if (!$url_generator) {
    @trigger_error('The url_generator service must be passed to LingotekDashboardController::__construct, it is included in lingotek:3.0.0 and required for lingotek:4.0.0.', E_USER_DEPRECATED);
    $url_generator = \Drupal::service('url_generator');
  }
  $this->urlGenerator = $url_generator;
}