You are here

public function ContentEntityBase::getRevisionId in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::getRevisionId()

Gets the revision identifier of the entity.

Return value

The revision identifier of the entity, or NULL if the entity does not have a revision identifier.

Overrides RevisionableInterface::getRevisionId

3 calls to ContentEntityBase::getRevisionId()
ContentEntityBase::isNewRevision in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Determines whether a new revision should be created on save.
ContentEntityBase::onChange in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Reacts to changes to a field.
ContentEntityBase::updateLoadedRevisionId in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Updates the loaded Revision ID with the revision ID.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 422

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function getRevisionId() {
  return $this
    ->getEntityKey('revision');
}