protected function LibraryItemController::getRevisionIds in Paragraphs 8
Gets a list of library item revision IDs for a specific library item.
Parameters
\Drupal\paragraphs_library\LibraryItemInterface $library_item: Library item entity.
Return value
int[] Library item revision IDs (in descending order)
1 call to LibraryItemController::getRevisionIds()
- LibraryItemController::revisionOverview in modules/
paragraphs_library/ src/ Controller/ LibraryItemController.php - Generates an overview table of older revisions of a library item.
File
- modules/
paragraphs_library/ src/ Controller/ LibraryItemController.php, line 195
Class
Namespace
Drupal\paragraphs_library\ControllerCode
protected function getRevisionIds(LibraryItemInterface $library_item) {
$result = $this->entityTypeManager
->getStorage('paragraphs_library_item')
->getQuery()
->allRevisions()
->condition('id', $library_item
->id())
->sort($library_item
->getEntityType()
->getKey('revision'), 'DESC')
->pager(50)
->execute();
return array_keys($result);
}