function WorkspaceListBuilder::render

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/src/WorkspaceListBuilder.php \Drupal\workspaces\WorkspaceListBuilder::render()
  2. 10 core/modules/workspaces/src/WorkspaceListBuilder.php \Drupal\workspaces\WorkspaceListBuilder::render()
  3. 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.