Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContentTranslationHandler.php

function 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 240

Class

ContentTranslationHandler
Base class for content translation handlers.

Namespace

Drupal\content_translation

Code

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);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal