Provides entity-specific defaults to the build process.
Drupal\Core\Entity\EntityInterface $entity: The entity for which the defaults should be provided.
string $view_mode: The view mode that should be used.
string $langcode: (optional) For which language the entity should be prepared, defaults to the current content language.
array
Overrides EntityRenderController::getBuildDefaults
protected function getBuildDefaults(EntityInterface $entity, $view_mode, $langcode) {
$return = parent::getBuildDefaults($entity, $view_mode, $langcode);
// TODO: rename "term" to "taxonomy_term" in theme_taxonomy_term().
$return['#term'] = $return["#{$this->entityType}"];
unset($return["#{$this->entityType}"]);
return $return;
}