public function RelationListBuilder::render in CRM Core 8.3
Same name and namespace in other branches
- 8 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_syncCode
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;
}