Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Nov 2015 at 11:43 UTC
Updated:
6 Dec 2015 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostThe only question left here about usage of
$translation->getUntranslated()There's no such method on
EntityInterfaceso probablyTranslatableInterfaceshould be passed to hookComment #3
plachThanks!
Comment #4
andypost@plach As I see, hooks are from
\Drupal\Core\Entity\ContentEntityStorageBase::invokeTranslationHooks()and they both use\Drupal\Core\TypedData\TranslatableInterfaceas argument.So the question is what interface should be used in this hooks. I'm sure that should be at least
\Drupal\Core\Entity\FieldableEntityInterfacebecause this hook is called only for content entitiesComment #5
xjmThanks @andypost. Maybe we can create a followup for #4? Since actually requiring a more specific interface is not really patch-release-friendly. Maybe we could add a comment to the hook documentation to start. But let's discuss that separately since this patch already corrects totally outdated/wrong entity API code examples.
Meanwhile, committed and pushed to 8.1.x and 8.0.x.
Comment #8
andypostFollow-up filed #2620942: Find proper interface to pass to hook_entity_translation_*
Comment #9
andypost