You are here

protected function RelationViewBuilder::getBuildDefaults in CRM Core 8

Same name and namespace in other branches
  1. 8.3 modules/crm_core_user_sync/src/RelationViewBuilder.php \Drupal\crm_core_user_sync\RelationViewBuilder::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

modules/crm_core_user_sync/src/RelationViewBuilder.php, line 16

Class

RelationViewBuilder
Provides a view controller for a relation entity type.

Namespace

Drupal\crm_core_user_sync

Code

protected function getBuildDefaults(EntityInterface $entity, $view_mode) {
  $build = parent::getBuildDefaults($entity, $view_mode);

  // The relation has no entity template itself.
  unset($build['#theme']);
  return $build;
}