function ModerationInformationInterface::getLatestRevision

Loads the latest revision of a specific entity.

Parameters

string $entity_type_id: The entity type ID.

int $entity_id: The entity ID.

Return value

\Drupal\Core\Entity\ContentEntityInterface|null The latest entity revision or NULL, if the entity type / entity doesn't exist.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use RevisionableStorageInterface::getLatestRevisionId and RevisionableStorageInterface::loadRevision instead.

See also

https://www.drupal.org/node/3087295

1 method overrides ModerationInformationInterface::getLatestRevision()
ModerationInformation::getLatestRevision in core/modules/content_moderation/src/ModerationInformation.php
Loads the latest revision of a specific entity.

File

core/modules/content_moderation/src/ModerationInformationInterface.php, line 79

Class

ModerationInformationInterface
Interface for moderation_information service.

Namespace

Drupal\content_moderation

Code

public function getLatestRevision($entity_type_id, $entity_id);

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