You are here

protected function InlineBlockEntityOperations::getBlockIdsForRevisionIds in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::getBlockIdsForRevisionIds()
  2. 9 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::getBlockIdsForRevisionIds()

Gets blocks IDs for an array of revision IDs.

Parameters

int[] $revision_ids: The revision IDs.

Return value

int[] The block IDs.

File

core/modules/layout_builder/src/InlineBlockEntityOperations.php, line 223

Class

InlineBlockEntityOperations
Defines a class for reacting to entity events related to Inline Blocks.

Namespace

Drupal\layout_builder

Code

protected function getBlockIdsForRevisionIds(array $revision_ids) {
  if ($revision_ids) {
    $query = $this->blockContentStorage
      ->getQuery()
      ->accessCheck(FALSE);
    $query
      ->condition('revision_id', $revision_ids, 'IN');
    $block_ids = $query
      ->execute();
    return $block_ids;
  }
  return [];
}