You are here

protected function EntityTestViewBuilder::getBuildDefaults in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/entity_test/src/EntityTestViewBuilder.php \Drupal\entity_test\EntityTestViewBuilder::getBuildDefaults()

Provides entity-specific defaults to the build process.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity for which the defaults should be provided.

string $view_mode: The view mode that should be used.

Return value

array

Overrides EntityViewBuilder::getBuildDefaults

File

core/modules/system/tests/modules/entity_test/src/EntityTestViewBuilder.php, line 23
Contains \Drupal\entity_test\EntityTestViewBuilder.

Class

EntityTestViewBuilder
Defines an entity view builder for a test entity.

Namespace

Drupal\entity_test

Code

protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
  $build = parent::getBuildDefaults($entity, $view_mode);
  unset($build['#theme']);
  return $build;
}