You are here

public function EntityContentBase::getHighestId in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::getHighestId()
  2. 9 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::getHighestId()

Returns the highest ID tracked by the implementing plugin.

Return value

int The highest ID.

Overrides HighestIdInterface::getHighestId

1 call to EntityContentBase::getHighestId()
EntityUser::getHighestId in core/modules/user/src/Plugin/migrate/destination/EntityUser.php
Returns the highest ID tracked by the implementing plugin.
2 methods override EntityContentBase::getHighestId()
EntityRevision::getHighestId in core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php
Returns the highest ID tracked by the implementing plugin.
EntityUser::getHighestId in core/modules/user/src/Plugin/migrate/destination/EntityUser.php
Returns the highest ID tracked by the implementing plugin.

File

core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php, line 404

Class

EntityContentBase
Provides destination class for all content entities lacking a specific class.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

public function getHighestId() {
  $values = $this->storage
    ->getQuery()
    ->accessCheck(FALSE)
    ->sort($this
    ->getKey('id'), 'DESC')
    ->range(0, 1)
    ->execute();
  return (int) current($values);
}