You are here

public function ModeratedNodeListBuilder::render in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/src/ModeratedNodeListBuilder.php \Drupal\content_moderation\ModeratedNodeListBuilder::render()
  2. 10 core/modules/content_moderation/src/ModeratedNodeListBuilder.php \Drupal\content_moderation\ModeratedNodeListBuilder::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/content_moderation/src/ModeratedNodeListBuilder.php, line 122

Class

ModeratedNodeListBuilder
Defines a class to build a listing of moderated node entities.

Namespace

Drupal\content_moderation

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('There is no moderated @label yet. Only pending versions of @label, such as drafts, are listed here.', [
    '@label' => $this->entityType
      ->getLabel(),
  ]);
  return $build;
}