W3cubDocs

/Drupal 8

public function RevisionableInterface::setNewRevision

public RevisionableInterface::setNewRevision($value = TRUE)

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 31

Class

RevisionableInterface
Provides methods for an entity to support revisions.

Namespace

Drupal\Core\Entity

Code

public function setNewRevision($value = TRUE);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!RevisionableInterface.php/function/RevisionableInterface::setNewRevision/8.1.x