X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd8%2Fhook%2FENTITY_TYPE_translation_insert.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd8%2Fhook%2FENTITY_TYPE_translation_insert.twig;h=604470a8b3d1f8bb898d03d62aa7999cfb9f2ffd;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/hook/ENTITY_TYPE_translation_insert.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/ENTITY_TYPE_translation_insert.twig new file mode 100644 index 000000000..604470a8b --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/ENTITY_TYPE_translation_insert.twig @@ -0,0 +1,10 @@ +/** + * Implements hook_ENTITY_TYPE_translation_insert(). + */ +function {{ machine_name }}_ENTITY_TYPE_translation_insert(\Drupal\Core\Entity\EntityInterface $translation) { + $variables = [ + '@language' => $translation->language()->getName(), + '@label' => $translation->getUntranslated()->label(), + ]; + \Drupal::logger('example')->notice('The @language translation of @label has just been stored.', $variables); +}