You are here

protected function InlineBlockEntityOperations::getBlockIdsForRevisionIds in Drupal 8

Same name and namespace in other branches
  1. 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.

2 calls to InlineBlockEntityOperations::getBlockIdsForRevisionIds()
InlineBlockEntityOperations::getPluginBlockId in core/modules/layout_builder/src/InlineBlockEntityOperations.php
Gets a block ID for an inline block plugin.
InlineBlockEntityOperations::getRemovedBlockIds in core/modules/layout_builder/src/InlineBlockEntityOperations.php
Gets the IDs of the inline blocks that were removed.

File

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

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();
    $query
      ->condition('revision_id', $revision_ids, 'IN');
    $block_ids = $query
      ->execute();
    return $block_ids;
  }
  return [];
}