You are here

public function PageListBuilder::render in Page Manager 8

Same name and namespace in other branches
  1. 8.4 page_manager_ui/src/Entity/PageListBuilder.php \Drupal\page_manager_ui\Entity\PageListBuilder::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

page_manager_ui/src/Entity/PageListBuilder.php, line 82
Contains \Drupal\page_manager_ui\Entity\PageListBuilder.

Class

PageListBuilder
Provides a list builder for page entities.

Namespace

Drupal\page_manager_ui\Entity

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('There are currently no pages. <a href=":url">Add a new page.</a>', [
    ':url' => Url::fromRoute('entity.page.add_form')
      ->toString(),
  ]);
  return $build;
}