function BlockViewBuilder::view
Same name in other branches
- 9 core/modules/block/src/BlockViewBuilder.php \Drupal\block\BlockViewBuilder::view()
- 8.9.x core/modules/block/src/BlockViewBuilder.php \Drupal\block\BlockViewBuilder::view()
- 11.x core/modules/block/src/BlockViewBuilder.php \Drupal\block\BlockViewBuilder::view()
Overrides EntityViewBuilder::view
File
-
core/
modules/ block/ src/ BlockViewBuilder.php, line 31
Class
- BlockViewBuilder
- Provides a Block view builder.
Namespace
Drupal\blockCode
public function view(EntityInterface $entity, $view_mode = 'full', $langcode = NULL) {
$build = $this->viewMultiple([
$entity,
], $view_mode, $langcode);
return reset($build);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.