function ContentEntityBase::isNewRevision
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::isNewRevision()
- 10 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::isNewRevision()
- 11.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::isNewRevision()
3 calls to ContentEntityBase::isNewRevision()
- BlockContent::preSaveRevision in core/
modules/ block_content/ src/ Entity/ BlockContent.php - Acts on a revision before it gets saved.
- Media::preSaveRevision in core/
modules/ media/ src/ Entity/ Media.php - Acts on a revision before it gets saved.
- Node::preSaveRevision in core/
modules/ node/ src/ Entity/ Node.php - Acts on a revision before it gets saved.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php, line 328
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\EntityCode
public function isNewRevision() {
return $this->newRevision || $this->getEntityType()
->hasKey('revision') && !$this->getRevisionId();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.