Skip to content
Snippets Groups Projects
Commit fcf03f4b authored by catch's avatar catch
Browse files

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

Issue #3065591 by Charlie ChX Negyesi, amateescu: Add a useful example to TranslatableInterface::addTranslation
parent 6add1ca7
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,11 @@ public function hasTranslation($langcode);
/**
* 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment