Issue #3065591 by Charlie ChX Negyesi, amateescu: Add a useful example to TranslatableInterface::addTranslation

merge-requests/55/head
catch 2019-07-18 13:42:18 +01:00
parent 6add1ca7a3
commit fcf03f4b81
1 changed files with 5 additions and 0 deletions

View File

@ -99,6 +99,11 @@ interface TranslatableInterface {
/**
* Adds a new translation to the translatable object.
*
* To create a translation of an entity prefilled with the original data:
* @code
* $entity->addTranslation($langcode, $entity->toArray())
* @endcode
*
* @param string $langcode
* The language code identifying the translation.
* @param array $values