public function isLatestRevision() { /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */ $storage = $this->entityTypeManager() ->getStorage($this->getEntityTypeId()); return $this->getLoadedRevisionId() == $storage->getLatestRevisionId($this->id()); }