You are here

public function AssetTypeListBuilder::render in farmOS 2.x

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/core/asset/src/AssetTypeListBuilder.php, line 49

Class

AssetTypeListBuilder
Provides a listing of asset type entities.

Namespace

Drupal\asset

Code

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