You are here

public function SequenceIndex::getLastSequenceId in Multiversion 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Index/SequenceIndex.php \Drupal\multiversion\Entity\Index\SequenceIndex::getLastSequenceId()

Return value

float

Overrides SequenceIndexInterface::getLastSequenceId

File

src/Entity/Index/SequenceIndex.php, line 82

Class

SequenceIndex

Namespace

Drupal\multiversion\Entity\Index

Code

public function getLastSequenceId() {
  $max_score = $this
    ->sortedSetStore()
    ->getMaxScore();
  if (empty($max_score)) {
    $max_score = $this
      ->sortedSetStore(0)
      ->getMaxScore();
  }
  return $max_score;
}