You are here

public function WebformAccessGroupListBuilder::render in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_access/src/WebformAccessGroupListBuilder.php \Drupal\webform_access\WebformAccessGroupListBuilder::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

modules/webform_access/src/WebformAccessGroupListBuilder.php, line 56

Class

WebformAccessGroupListBuilder
Defines a class to build a listing of webform access group entities.

Namespace

Drupal\webform_access

Code

public function render() {
  $build = [];

  // Filter form.
  $build['filter_form'] = $this
    ->buildFilterForm();

  // Display info.
  $build['info'] = $this
    ->buildInfo();

  // Table.
  $build += parent::render();
  $build['table']['#sticky'] = TRUE;
  $build['table']['#attributes']['class'][] = 'webform-access-group-table';

  // Attachments.
  $build['#attached']['library'][] = 'webform/webform.admin';
  $build['#attached']['library'][] = 'webform/webform.admin.dialog';
  return $build;
}