You are here

public function KeyValueContentEntityStorage::createTranslation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage::createTranslation()

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 21
Contains \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage.

Class

KeyValueContentEntityStorage
Provides a key value backend for content entities.

Namespace

Drupal\Core\Entity\KeyValueStore

Code

public function createTranslation(ContentEntityInterface $entity, $langcode, array $values = []) {

  // @todo
}