You are here

public function UserRestrictionsListBuilder::render in User restrictions 8

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

src/UserRestrictionsListBuilder.php, line 61

Class

UserRestrictionsListBuilder
Defines a class to build a listing of image style entities.

Namespace

Drupal\user_restrictions

Code

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