You are here

public function LingotekEntityController::__construct in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 4.0.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()
  2. 3.2.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()
  3. 3.4.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()
  4. 3.5.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()
  5. 3.6.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()
  6. 3.7.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()
  7. 3.8.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::__construct()

Constructs a LingotekEntityController object.

Parameters

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

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

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

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

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

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

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

Overrides LingotekControllerBase::__construct

File

src/Controller/LingotekEntityController.php, line 62

Class

LingotekEntityController

Namespace

Drupal\lingotek\Controller

Code

public function __construct(Request $request, ConfigFactoryInterface $config_factory, LingotekInterface $lingotek, LanguageLocaleMapperInterface $language_locale_mapper, FormBuilderInterface $form_builder, LoggerInterface $logger, LingotekConfigurationServiceInterface $lingotek_configuration = NULL, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL) {
  parent::__construct($request, $config_factory, $lingotek, $language_locale_mapper, $form_builder, $logger);
  if (!$lingotek_configuration) {
    @trigger_error('The lingotek.configuration service must be passed to LingotekEntityController::__construct, it is included in lingotek:3.2.0 and required for lingotek:4.0.0.', E_USER_DEPRECATED);
    $lingotek_configuration = \Drupal::service('lingotek.configuration');
  }
  $this->lingotekConfiguration = $lingotek_configuration;
  if (!$entity_type_bundle_info) {
    @trigger_error('The entity_type.bundle.info service must be passed to LingotekEntityController::__construct, it is included in lingotek:3.2.0 and required for lingotek:4.0.0.', E_USER_DEPRECATED);
    $entity_type_bundle_info = \Drupal::service('entity_type.bundle.info');
  }
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
}