You are here

public function RelationTypeListBuilder::render in Relation 8

Same name and namespace in other branches
  1. 8.2 src/RelationTypeListBuilder.php \Drupal\relation\RelationTypeListBuilder::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/RelationTypeListBuilder.php, line 40
Contains \Drupal\relation\RelationTypeListBuilder.

Class

RelationTypeListBuilder
Provides a listing of relation types.

Namespace

Drupal\relation

Code

public function render() {
  $build = parent::render();
  $build['#empty'] = t('No relation types exist. <a href="@link">Add relation type</a>.', array(
    '@link' => Url::fromRoute('entity.relation_type.add_form'),
  ));
  return $build;
}