You are here

protected function InlineBlockEntityOperations::getBlockIdsForRevisionIds in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::getBlockIdsForRevisionIds()
  2. 10 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 229

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 [];
}