public function KeyValueContentEntityStorage::createTranslation
public KeyValueContentEntityStorage::createTranslation(ContentEntityInterface $entity, $langcode, array $values = [])
Constructs a new entity translation object, without permanently saving it.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity object being translated.
string $langcode: The translation language code.
array $values: (optional) An associative array of initial field values keyed by field name. If none is provided default values will be applied.
Return value
\Drupal\Core\Entity\ContentEntityInterface A new entity translation object.
Overrides ContentEntityStorageInterface::createTranslation
File
- core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php, line 16
Class
- KeyValueContentEntityStorage
- Provides a key value backend for content entities.
Namespace
Drupal\Core\Entity\KeyValueStoreCode
public function createTranslation(ContentEntityInterface $entity, $langcode, array $values = []) { // @todo Complete the content entity storage implementation in // https://www.drupal.org/node/2618436. }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!KeyValueStore!KeyValueContentEntityStorage.php/function/KeyValueContentEntityStorage::createTranslation/8.1.x