Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / entity_revision_create.twig
1 /**
2  * Implements hook_entity_revision_create().
3  */
4 function {{ machine_name }}_entity_revision_create(Drupal\Core\Entity\EntityInterface $new_revision, Drupal\Core\Entity\EntityInterface $entity, $keep_untranslatable_fields) {
5   // Retain the value from an untranslatable field, which are by default
6   // synchronized from the default revision.
7   $new_revision->set('untranslatable_field', $entity->get('untranslatable_field'));
8 }