You are here

public function WorkspaceListBuilder::render in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workspaces/src/WorkspaceListBuilder.php \Drupal\workspaces\WorkspaceListBuilder::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/workspaces/src/WorkspaceListBuilder.php, line 187

Class

WorkspaceListBuilder
Defines a class to build a listing of workspace entities.

Namespace

Drupal\workspaces

Code

public function render() {
  $build = parent::render();
  if ($this
    ->isAjax()) {
    $this
      ->offCanvasRender($build);
  }
  else {
    $build['#attached'] = [
      'library' => [
        'workspaces/drupal.workspaces.overview',
      ],
    ];
  }
  return $build;
}