function ModerationInformation::getLatestRevisionId

Overrides ModerationInformationInterface::getLatestRevisionId

File

core/modules/content_moderation/src/ModerationInformation.php, line 98

Class

ModerationInformation
General service for moderation-related questions about Entity API.

Namespace

Drupal\content_moderation

Code

public function getLatestRevisionId($entity_type_id, $entity_id) {
    @trigger_error(__METHOD__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use RevisionableStorageInterface::getLatestRevisionId() instead. See https://www.drupal.org/node/3087295', E_USER_DEPRECATED);
    
    /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
    if ($storage = $this->entityTypeManager
        ->getStorage($entity_type_id)) {
        return $storage->getLatestRevisionId($entity_id);
    }
}

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