Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BlockViewBuilder.php

function BlockViewBuilder::view

Overrides EntityViewBuilder::view

File

core/modules/block/src/BlockViewBuilder.php, line 31

Class

BlockViewBuilder
Provides a Block view builder.

Namespace

Drupal\block

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal