You are here

public function GroupTypeListBuilder::render in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Controller/GroupTypeListBuilder.php \Drupal\group\Entity\Controller\GroupTypeListBuilder::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

src/Entity/Controller/GroupTypeListBuilder.php, line 82

Class

GroupTypeListBuilder
Defines a class to build a listing of group type entities.

Namespace

Drupal\group\Entity\Controller

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('No group types available. <a href="@link">Add group type</a>.', [
    '@link' => Url::fromRoute('entity.group_type.add_form')
      ->toString(),
  ]);
  return $build;
}