public function RevisionableStorageInterface::createRevision in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface::createRevision()
- 9 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);