public function ModerationInformation::isLatestRevision in Config Entity Revisions 8.2
Determines if an entity is a latest revision.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: A revisionable content entity.
Return value
bool TRUE if the specified object is the latest revision of its entity, FALSE otherwise.
Overrides ModerationInformation::isLatestRevision
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use RevisionableInterface::isLatestRevision instead.
See also
https://www.drupal.org/node/3087295
1 call to ModerationInformation::isLatestRevision()
- ModerationInformation::isLiveRevision in src/
ModerationInformation.php - Determines if an entity is "live".
File
- src/
ModerationInformation.php, line 157
Class
- ModerationInformation
- Class ModerationInformation.
Namespace
Drupal\config_entity_revisionsCode
public function isLatestRevision(ContentEntityInterface $entity) {
return $entity
->getRevisionId() == $this
->getLatestRevisionId($entity
->getEntityTypeId(), $entity
->id());
}