function ContentTranslationHandler::retranslate
Same name in other branches
- 9 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::retranslate()
- 10 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::retranslate()
- 11.x core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::retranslate()
Overrides ContentTranslationHandlerInterface::retranslate
1 call to ContentTranslationHandler::retranslate()
- ContentTranslationHandler::entityFormEntityBuild in core/
modules/ content_translation/ src/ ContentTranslationHandler.php - Entity builder method.
File
-
core/
modules/ content_translation/ src/ ContentTranslationHandler.php, line 277
Class
- ContentTranslationHandler
- Base class for content translation handlers.
Namespace
Drupal\content_translationCode
public function retranslate(EntityInterface $entity, $langcode = NULL) {
$updated_langcode = !empty($langcode) ? $langcode : $entity->language()
->getId();
foreach ($entity->getTranslationLanguages() as $langcode => $language) {
$this->manager
->getTranslationMetadata($entity->getTranslation($langcode))
->setOutdated($langcode != $updated_langcode);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.