You are here

public function EdgeEntityListBuilder::render in Apigee Edge 8

Builds the entity listing as renderable array for table.html.twig.

@todo Add a link to add a new item to the #empty text.

Overrides EntityListBuilder::render

2 calls to EdgeEntityListBuilder::render()
AppListBuilder::render in src/Entity/ListBuilder/AppListBuilder.php
Builds the entity listing as renderable array for table.html.twig.
TeamListBuilder::render in modules/apigee_edge_teams/src/Entity/ListBuilder/TeamListBuilder.php
Builds the entity listing as renderable array for table.html.twig.
2 methods override EdgeEntityListBuilder::render()
AppListBuilder::render in src/Entity/ListBuilder/AppListBuilder.php
Builds the entity listing as renderable array for table.html.twig.
TeamListBuilder::render in modules/apigee_edge_teams/src/Entity/ListBuilder/TeamListBuilder.php
Builds the entity listing as renderable array for table.html.twig.

File

src/Entity/ListBuilder/EdgeEntityListBuilder.php, line 126

Class

EdgeEntityListBuilder
Default entity list builder for Apigee Edge entities.

Namespace

Drupal\apigee_edge\Entity\ListBuilder

Code

public function render() {
  $settings = $this
    ->getDisplaySettings();
  if ($this
    ->usingDisplayType(static::VIEW_MODE_DISPLAY_TYPE)) {
    $build = $this
      ->renderUsingViewMode($settings['view_mode']);
  }
  else {
    $build = parent::render();
  }

  // Add cache contexts.
  $build['#cache'] = [
    'contexts' => $this->entityType
      ->getListCacheContexts(),
    'tags' => $this->entityType
      ->getListCacheTags(),
    'max-age' => $this
      ->getCacheMaxAge(),
  ];
  return $build;
}