You are here

public function UserListBuilder::render in Drupal 10

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

Class

UserListBuilder
Defines a class to build a listing of user entities.

Namespace

Drupal\user

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('No people available.');
  return $build;
}