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
protected function getBuildDefaults(EntityInterface $entity, $view_mode, $langcode) {
$return = array(
'#theme' => $this->entityType,
"#{$this->entityType}" => $entity,
'#view_mode' => $view_mode,
'#langcode' => $langcode,
);
return $return;
}