public function ContentEntityStorageInterface::createTranslation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php \Drupal\Core\Entity\ContentEntityStorageInterface::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.
2 methods override ContentEntityStorageInterface::createTranslation()
- ContentEntityStorageBase::createTranslation in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Constructs a new entity translation object, without permanently saving it.
- KeyValueContentEntityStorage::createTranslation in core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueContentEntityStorage.php - Constructs a new entity translation object, without permanently saving it.
File
- core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageInterface.php, line 29 - Contains \Drupal\Core\Entity\ContentEntityStorageInterface.
Class
- ContentEntityStorageInterface
- A storage that supports content entity types.
Namespace
Drupal\Core\EntityCode
public function createTranslation(ContentEntityInterface $entity, $langcode, array $values = []);