You are here

public function NotificationInformation::getLatestRevision in Content Moderation Notifications 8.2

Same name and namespace in other branches
  1. 8.3 src/NotificationInformation.php \Drupal\content_moderation_notifications\NotificationInformation::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.

Overrides NotificationInformationInterface::getLatestRevision

File

src/NotificationInformation.php, line 111

Class

NotificationInformation
Service for notification related questions about the moderated entity.

Namespace

Drupal\content_moderation_notifications

Code

public function getLatestRevision($entity_type_id, $entity_id) {
  return $this->moderationInformation
    ->getLatestRevision($entity_type_id, $entity_id);
}