You are here

public function WebhookListBuilder::render in Webhooks 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

File

modules/webhook/src/WebhookListBuilder.php, line 65

Class

WebhookListBuilder
Provides a list controller for the webhook entity type.

Namespace

Drupal\webhook

Code

public function render() {
  $build['table'] = parent::render();
  $total = $this
    ->getStorage()
    ->getQuery()
    ->count()
    ->execute();
  $build['summary']['#markup'] = $this
    ->t('Total webhooks: @total', [
    '@total' => $total,
  ]);
  return $build;
}