You are here

public function RelationListBuilder::render in CRM Core 8

Same name and namespace in other branches
  1. 8.3 modules/crm_core_user_sync/src/RelationListBuilder.php \Drupal\crm_core_user_sync\RelationListBuilder::render()

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/crm_core_user_sync/src/RelationListBuilder.php, line 65

Class

RelationListBuilder
Provides a list controller for the relation entity type.

Namespace

Drupal\crm_core_user_sync

Code

public function render() {
  $total = \Drupal::database()
    ->query('SELECT COUNT(*) FROM {crm_core_user_sync_relation}')
    ->fetchField();
  $build['summary']['#markup'] = $this
    ->t('Total relations: @total', [
    '@total' => $total,
  ]);
  $build['table'] = parent::render();
  return $build;
}