function ContentTranslationManager::getTranslationMetadata
Same name in other branches
- 9 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::getTranslationMetadata()
- 8.9.x core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::getTranslationMetadata()
- 10 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::getTranslationMetadata()
File
-
core/
modules/ content_translation/ src/ ContentTranslationManager.php, line 52
Class
- ContentTranslationManager
- Provides common functionality for content translation.
Namespace
Drupal\content_translationCode
public function getTranslationMetadata(EntityInterface $translation) {
// We need a new instance of the metadata handler wrapping each translation.
$entity_type = $translation->getEntityType();
$class = $entity_type->get('content_translation_metadata');
return new $class($translation, $this->getTranslationHandler($entity_type->id()));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.