function EntityRevision::getHighestId
Same name in other branches
- 9 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getHighestId()
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getHighestId()
- 10 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getHighestId()
Overrides EntityContentBase::getHighestId
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityRevision.php, line 204
Class
- EntityRevision
- Provides entity revision destination plugin.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function getHighestId() {
$values = $this->storage
->getQuery()
->accessCheck(FALSE)
->allRevisions()
->sort($this->getKey('revision'), 'DESC')
->range(0, 1)
->execute();
// The array keys are the revision IDs.
// The array contains only one entry, so we can use key().
return (int) key($values);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.