function translation_entity_entity_update

Implements hook_entity_update().

File

drupal/core/modules/translation_entity/translation_entity.module, line 772
Allows entities to be translated into different languages.

Code

function translation_entity_entity_update(EntityInterface $entity) {

  // Only do something if translation support for the given entity is enabled.
  if (!$entity
    ->isTranslatable()) {
    return;
  }

  // Delete and create to ensure no stale value remains behind.
  translation_entity_entity_delete($entity);
  translation_entity_entity_insert($entity);
}