function BlockContentViewBuilder::view

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

Overrides EntityViewBuilder::view

File

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

Class

BlockContentViewBuilder
View builder handler for custom blocks.

Namespace

Drupal\block_content

Code

public function view(EntityInterface $entity, $view_mode = 'full', $langcode = NULL) {
    return $this->viewMultiple([
        $entity,
    ], $view_mode, $langcode)[0];
}

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