public function KeyListBuilder::render in Key 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/ KeyListBuilder.php, line 121
Class
- KeyListBuilder
- Provides a listing of keys.
Namespace
Drupal\key\ControllerCode
public function render() {
$build = parent::render();
$build['table']['#empty'] = $this
->t('No keys are available. <a href=":link">Add a key</a>.', [
':link' => Url::fromRoute('entity.key.add_form')
->toString(),
]);
return $build;
}