public function Entity::isNewRevision

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

Overrides EntityInterface::isNewRevision

File

drupal/core/lib/Drupal/Core/Entity/Entity.php, line 103
Contains \Drupal\Core\Entity\Entity.

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function isNewRevision() {
  $info = $this
    ->entityInfo();
  return $this->newRevision || !empty($info['entity_keys']['revision']) && !$this
    ->getRevisionId();
}