You are here

protected function TeamViewBuilder::getBuildDefaults in Apigee Edge 8

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 EdgeEntityViewBuilder::getBuildDefaults

File

modules/apigee_edge_teams/src/Entity/TeamViewBuilder.php, line 83

Class

TeamViewBuilder
Entity view builder for team entities.

Namespace

Drupal\apigee_edge_teams\Entity

Code

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

  // Use cache expiration defined in configuration.
  $build['#cache']['max-age'] = $this->config
    ->get('cache_expiration');
  return $build;
}