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\KeyValueStore

Code

public function createTranslation(ContentEntityInterface $entity, $langcode, array $values = []) {
  // @todo Complete the content entity storage implementation in
  //   https://www.drupal.org/node/2618436.
}
doc_Drupal
2016-10-29 09:21:39
Comments
Leave a Comment

Please login to continue.