NodeTypeListBuilder::render

public 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 56

Class

NodeTypeListBuilder
Defines a class to build a listing of node type entities.

Namespace

Drupal\node

Code

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;
}
doc_Drupal
2016-10-29 09:31:44
Comments
Leave a Comment

Please login to continue.