public function SimpleSitemapTypeListBuilder::render in Simple XML sitemap 4.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
- src/
SimpleSitemapTypeListBuilder.php, line 55
Class
- SimpleSitemapTypeListBuilder
- Class SimpleSitemapTypeListBuilder
Namespace
Drupal\simple_sitemapCode
public function render() {
$build['#prefix'] = FormHelper::getDonationText();
$build += parent::render();
$build['table']['#empty'] = $this
->t('No sitemap types have been defined yet. <a href="@url">Add a new one</a>.', [
'@url' => Url::fromRoute('simple_sitemap_type.add')
->toString(),
]);
return $build;
}