public function KeyValueContentEntityStorage::createRevision in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage::createRevision()
- 9 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage::createRevision()
Creates a new revision starting off from the specified entity object.
When dealing with a translatable entity, this will merge the default revision with the active translation of the passed entity.
Parameters
\Drupal\Core\Entity\RevisionableInterface $entity: The revisionable entity object being modified.
bool $default: (optional) Whether the new revision should be marked as default. Defaults to TRUE.
bool|null $keep_untranslatable_fields: (optional) Whether untranslatable field values should be kept or copied from the default revision when generating a merged revision. Defaults to TRUE if the provided entity is the default translation and untranslatable fields should only affect the default translation, FALSE otherwise.
Return value
\Drupal\Core\Entity\TranslatableRevisionableInterface A new translatable entity revision object.
Overrides TranslatableRevisionableStorageInterface::createRevision
File
- core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueContentEntityStorage.php, line 33
Class
- KeyValueContentEntityStorage
- Provides a key value backend for content entities.
Namespace
Drupal\Core\Entity\KeyValueStoreCode
public function createRevision(RevisionableInterface $entity, $default = TRUE, $keep_untranslatable_fields = NULL) {
return NULL;
}