You are here

public function EckEntityBundleListBuilder::render in Entity Construction Kit (ECK) 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/Controller/EckEntityBundleListBuilder.php, line 100

Class

EckEntityBundleListBuilder
Defines a class to build a listing of node type entities.

Namespace

Drupal\eck\Controller

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('No bundles available. @link.', [
    '@link' => Link::fromTextAndUrl($this
      ->t('Add new bundle'), new Url('eck.entity.' . $this->entityType
      ->id() . '.add'))
      ->toString(),
  ]);
  return $build;
}