public function BlockRenderController::view

Implements Drupal\Core\Entity\EntityRenderControllerInterface::view().

Overrides EntityRenderControllerInterface::view

File

drupal/core/modules/block/lib/Drupal/block/BlockRenderController.php, line 28
Contains \Drupal\block\BlockRenderController.

Class

BlockRenderController
Provides a Block render controller.

Namespace

Drupal\block

Code

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