function ContentTranslationManager::__construct
Same name in other branches
- 9 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::__construct()
- 10 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::__construct()
- 11.x core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::__construct()
Constructs a ContentTranslationManageAccessCheck object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info provider.
File
-
core/
modules/ content_translation/ src/ ContentTranslationManager.php, line 47
Class
- ContentTranslationManager
- Provides common functionality for content translation.
Namespace
Drupal\content_translationCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, $entity_type_bundle_info) {
$this->entityTypeManager = $entity_type_manager;
if (!$entity_type_bundle_info instanceof EntityTypeBundleInfoInterface) {
@trigger_error('The entity_type.bundle.info service should be passed to ContentTranslationManager::__construct() instead of the content_translation.updates_manager service since 8.7.0. This will be required in Drupal 9.0.0. See https://www.drupal.org/node/2549139 and https://www.drupal.org/node/2973222.', E_USER_DEPRECATED);
$entity_type_bundle_info = \Drupal::service('entity_type.bundle.info');
}
$this->entityTypeBundleInfo = $entity_type_bundle_info;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.