function RevisionableStorageInterface::createRevision
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface::createRevision()
- 8.9.x core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface::createRevision()
- 10 core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface::createRevision()
Creates a new revision starting off from the specified entity object.
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.
Return value
\Drupal\Core\Entity\RevisionableInterface A new entity revision object.
1 method overrides RevisionableStorageInterface::createRevision()
- TranslatableRevisionableStorageInterface::createRevision in core/
lib/ Drupal/ Core/ Entity/ TranslatableRevisionableStorageInterface.php - Creates a new revision starting off from the specified entity object.
File
-
core/
lib/ Drupal/ Core/ Entity/ RevisionableStorageInterface.php, line 22
Class
- RevisionableStorageInterface
- A storage that supports revisionable entity types.
Namespace
Drupal\Core\EntityCode
public function createRevision(RevisionableInterface $entity, $default = TRUE);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.