You are here

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

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

Constructs a new LingotekManagementForm object.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

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

\Drupal\Component\Datetime\TimeInterface $time: The time service.

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

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

\Drupal\lingotek\LingotekContentTranslationServiceInterface $translation_service: The Lingotek content translation service.

string $entity_type_id: The entity type id.

Overrides ContentEntityForm::__construct

File

src/Form/LingotekMetadataEditForm.php, line 70

Class

LingotekMetadataEditForm

Namespace

Drupal\lingotek\Form

Code

public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, LanguageManagerInterface $language_manager, LanguageLocaleMapperInterface $language_locale_mapper, LingotekContentTranslationServiceInterface $translation_service, ModuleHandlerInterface $module_handler, $entity_type_id) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->languageManager = $language_manager;
  $this->languageLocaleMapper = $language_locale_mapper;
  $this->translationService = $translation_service;
  $this->entityTypeId = $entity_type_id;
  $this
    ->setModuleHandler($module_handler);
  $this->lingotek = \Drupal::service('lingotek');
  $this->operation = 'lingotek_metadata';
  $entity = $this
    ->getEntityFromRouteMatch($this
    ->getRouteMatch(), $this->entityTypeId);
  $this
    ->setEntity($entity);
}