public function MediaGalleryListBuilder::render in Media Gallery 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
- src/
MediaGalleryListBuilder.php, line 65
Class
- MediaGalleryListBuilder
- Provides a list controller for the media gallery entity type.
Namespace
Drupal\media_galleryCode
public function render() {
$build['table'] = parent::render();
$total = $this
->getStorage()
->getQuery()
->count()
->execute();
$build['summary']['#markup'] = $this
->t('Total media galleries: @total', [
'@total' => $total,
]);
return $build;
}