value) { $this->value = REQUEST_TIME; } else { // On an existing entity translation, the changed timestamp will only be // set to the request time automatically if at least one other field value // of the entity has changed. This detection does not run on new entities // and will be turned off if the changed timestamp is set manually before // save, for example during migrations or by using // \Drupal\content_translation\ContentTranslationMetadataWrapperInterface::setChangedTime(). /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ $entity = $this->getEntity(); /** @var \Drupal\Core\Entity\ContentEntityInterface $original */ $original = $entity->original; $langcode = $entity->language()->getId(); if (!$entity->isNew() && $original->hasTranslation($langcode)) { $original_value = $original->getTranslation($langcode)->get($this->getFieldDefinition()->getName())->value; if ($this->value == $original_value && $entity->hasTranslationChanges()) { $this->value = REQUEST_TIME; } } } } }