You are here

public function BlocktabsListBuilder::render in Block Tabs 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/BlocktabsListBuilder.php, line 85

Class

BlocktabsListBuilder
Defines a class to build a listing of blocktabs entities.

Namespace

Drupal\blocktabs

Code

public function render() {
  $build = parent::render();
  $build['#empty'] = $this
    ->t('There are currently no blocktabs. <a href=":url">Add a new one</a>.', [
    ':url' => $this->urlGenerator
      ->generateFromRoute('blocktabs.add'),
  ]);
  return $build;
}