function RevisionableInterface::setNewRevision

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/RevisionableInterface.php \Drupal\Core\Entity\RevisionableInterface::setNewRevision()
  2. 8.9.x core/lib/Drupal/Core/Entity/RevisionableInterface.php \Drupal\Core\Entity\RevisionableInterface::setNewRevision()
  3. 10 core/lib/Drupal/Core/Entity/RevisionableInterface.php \Drupal\Core\Entity\RevisionableInterface::setNewRevision()

Enforces an entity to be saved as a new revision.

Parameters

bool $value: (optional) Whether a new revision should be saved.

Throws

\LogicException Thrown if the entity does not support revisions.

See also

\Drupal\Core\Entity\EntityInterface::isNewRevision()

File

core/lib/Drupal/Core/Entity/RevisionableInterface.php, line 48

Class

RevisionableInterface
Provides methods for an entity to support revisions.

Namespace

Drupal\Core\Entity

Code

public function setNewRevision($value = TRUE);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.