public function NodeTypeListBuilder::render in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/node/src/NodeTypeListBuilder.php \Drupal\node\NodeTypeListBuilder::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
- core/
modules/ node/ src/ NodeTypeListBuilder.php, line 61 - Contains \Drupal\node\NodeTypeListBuilder.
Class
- NodeTypeListBuilder
- Defines a class to build a listing of node type entities.
Namespace
Drupal\nodeCode
public function render() {
$build = parent::render();
$build['table']['#empty'] = $this
->t('No content types available. <a href=":link">Add content type</a>.', [
':link' => Url::fromRoute('node.type_add')
->toString(),
]);
return $build;
}