public function ModerationInformation::isLatestRevision in Drupal 8
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 ModerationInformationInterface::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
File
- core/
modules/ content_moderation/ src/ ModerationInformation.php, line 139
Class
- ModerationInformation
- General service for moderation-related questions about Entity API.
Namespace
Drupal\content_moderationCode
public function isLatestRevision(ContentEntityInterface $entity) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use RevisionableInterface::isLatestRevision() instead. See https://www.drupal.org/node/3087295', E_USER_DEPRECATED);
return $entity
->isLatestRevision();
}