function _quickedit_entity_is_latest_revision

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 190

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.