You are here

function _quickedit_entity_is_latest_revision in Drupal 8

Check if a loaded entity is the latest revision.

@internal

Parameters

\Drupal\Core\Entity\RevisionableInterface $entity: The entity to check.

Return value

bool TRUE if the loaded entity is the latest revision, FALSE otherwise.

Deprecated

in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\RevisionableInterface::isLatestRevision() instead. As internal API, _quickedit_entity_is_latest_revision() may also be removed in a minor release.

File

core/modules/quickedit/quickedit.module, line 189
Provides in-place content editing functionality for fields.

Code

function _quickedit_entity_is_latest_revision(RevisionableInterface $entity) {
  @trigger_error('_quickedit_entity_is_latest_revision() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Core\\Entity\\RevisionableInterface::isLatestRevision() instead. As internal API, _quickedit_entity_is_latest_revision() may also be removed in a minor release.', E_USER_DEPRECATED);
  return $entity
    ->isLatestRevision();
}