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

Breadcrumb

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

function BlockContentViewBuilder::getBuildDefaults

Overrides EntityViewBuilder::getBuildDefaults

File

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

Class

BlockContentViewBuilder
View builder handler for content blocks.

Namespace

Drupal\block_content

Code

protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
    $build = parent::getBuildDefaults($entity, $view_mode);
    // The content block will be rendered in the wrapped block template already
    // and thus has no entity template itself.
    unset($build['#theme']);
    return $build;
}

API Navigation

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