You are here

private function NestedLayoutBuilderEntitiesDetector::prepareBlockContentIds in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.6.x src/Plugin/RelatedEntitiesDetector/NestedLayoutBuilderEntitiesDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\NestedLayoutBuilderEntitiesDetector::prepareBlockContentIds()
  2. 3.7.x src/Plugin/RelatedEntitiesDetector/NestedLayoutBuilderEntitiesDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\NestedLayoutBuilderEntitiesDetector::prepareBlockContentIds()
  3. 3.8.x src/Plugin/RelatedEntitiesDetector/NestedLayoutBuilderEntitiesDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\NestedLayoutBuilderEntitiesDetector::prepareBlockContentIds()

Get block content ids from the revision ids stored in the field definition of parent entity

Parameters

array $blockContentRevisionIds: An array of block revision IDs.

Return value

array An array of block IDs.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 call to NestedLayoutBuilderEntitiesDetector::prepareBlockContentIds()
NestedLayoutBuilderEntitiesDetector::extract in src/Plugin/RelatedEntitiesDetector/NestedLayoutBuilderEntitiesDetector.php
Extract nested and related content.

File

src/Plugin/RelatedEntitiesDetector/NestedLayoutBuilderEntitiesDetector.php, line 167

Class

NestedLayoutBuilderEntitiesDetector
@RelatedEntitiesDetector ( id = "nested_layout_builder_entities_detector", title = Plugin annotation @Translation("Get related nested layout builder content"), description = @translation("The default retrieval of nested layout builder…

Namespace

Drupal\lingotek\Plugin\RelatedEntitiesDetector

Code

private function prepareBlockContentIds(array $blockContentRevisionIds) {

  /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $blockContentStorage */
  $blockContentStorage = $this->entityTypeManager
    ->getStorage('block_content');
  $ids = $blockContentStorage
    ->getQuery()
    ->condition($blockContentStorage
    ->getEntityType()
    ->getKey('revision'), $blockContentRevisionIds, 'IN')
    ->execute();
  return $ids;
}