public function ConfigEntityRevisionsConfigEntityTrait::isLatestRevision in Config Entity Revisions 8.2
Checks if this entity is the latest revision.
Return value
bool TRUE if the entity is the latest revision, FALSE otherwise.
File
- src/
ConfigEntityRevisionsConfigEntityTrait.php, line 421
Class
- ConfigEntityRevisionsConfigEntityTrait
- Trait ConfigEntityRevisionsConfigEntityTrait.
Namespace
Drupal\config_entity_revisionsCode
public function isLatestRevision() {
/** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
$storage = $this
->entityTypeManager()
->getStorage($this
->getEntityTypeId());
return $this
->getLoadedRevisionId() == $storage
->getLatestRevisionId($this
->id());
}