function BlockContentViewBuilder::viewMultiple

Same name and namespace in other branches
  1. 9 core/modules/block_content/src/BlockContentViewBuilder.php \Drupal\block_content\BlockContentViewBuilder::viewMultiple()
  2. 8.9.x core/modules/block_content/src/BlockContentViewBuilder.php \Drupal\block_content\BlockContentViewBuilder::viewMultiple()
  3. 11.x core/modules/block_content/src/BlockContentViewBuilder.php \Drupal\block_content\BlockContentViewBuilder::viewMultiple()

Overrides EntityViewBuilder::viewMultiple

File

core/modules/block_content/src/BlockContentViewBuilder.php, line 30

Class

BlockContentViewBuilder
View builder handler for content blocks.

Namespace

Drupal\block_content

Code

public function viewMultiple(array $entities = [], $view_mode = 'full', $langcode = NULL) {
  $build_list = parent::viewMultiple($entities, $view_mode, $langcode);
  // Apply the buildMultiple() #pre_render callback immediately, to make
  // bubbling of attributes and contextual links to the actual block work.
  // @see \Drupal\block\BlockViewBuilder::buildBlock()
  unset($build_list['#pre_render'][0]);
  return $this->buildMultiple($build_list);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.