You are here

public function ConfigEntityRevisionsRevisionStorageHandler::getLatestPublishedRevision in Config Entity Revisions 8.2

Gets the latest published revision ID of the entity.

Parameters

int $ignore: A revision ID to ignore (optional).

Return value

int The identifier of the latest published revision of the entity, or NULL if the entity does not have a published revision.

Overrides ConfigEntityRevisionsRevisionStorageHandlerInterface::getLatestPublishedRevision

File

src/Entity/Handler/ConfigEntityRevisionsRevisionStorageHandler.php, line 185

Class

ConfigEntityRevisionsRevisionStorageHandler
Class ConfigEntityRevisionsRevisionStorageHandler.

Namespace

Drupal\config_entity_revisions\Entity\Handler

Code

public function getLatestPublishedRevision($ignore = NULL) {
  $revision = NULL;
  $revision_id = $this
    ->getLatestPublishedRevisionId($ignore);
  if ($revision_id) {
    $revision = $this
      ->loadRevision($revision_id);
  }
  return $revision;
}