Issue #3065591 by Charlie ChX Negyesi, amateescu: Add a useful example to TranslatableInterface::addTranslation
parent
6add1ca7a3
commit
fcf03f4b81
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue