ContentEntityStorageInterface::createTranslation

public ContentEntityStorageInterface::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.

File

core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php, line 24

Class

ContentEntityStorageInterface
A storage that supports content entity types.

Namespace

Drupal\Core\Entity

Code

public function createTranslation(ContentEntityInterface $entity, $langcode, array $values = []);
doc_Drupal
2016-10-29 08:57:38
Comments
Leave a Comment

Please login to continue.