You are here

public function UnitBundleListBuilder::render in Booking and Availability Management Tools for Drupal 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/bat_unit/src/UnitBundleListBuilder.php, line 56
Contains \Drupal\bat_unit\UnitBundleListBuilder.

Class

UnitBundleListBuilder
Defines a class to build a listing of event type entities.

Namespace

Drupal\bat_unit

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('No unit bundles available. <a href=":link">Add unit bundle</a>.', [
    ':link' => Url::fromRoute('entity.bat_unit_bundle.type_add')
      ->toString(),
  ]);
  return $build;
}