You are here

public function WebformEntityListBuilder::buildHeader in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformEntityListBuilder.php \Drupal\webform\WebformEntityListBuilder::buildHeader()

Builds the header row for the entity listing.

Return value

array A render array structure of header strings.

Overrides EntityListBuilder::buildHeader

See also

\Drupal\Core\Entity\EntityListBuilder::render()

1 call to WebformEntityListBuilder::buildHeader()
WebformEntityListBuilder::getEntityIds in src/WebformEntityListBuilder.php
Loads entity IDs using a pager sorted by the entity id.

File

src/WebformEntityListBuilder.php, line 236

Class

WebformEntityListBuilder
Defines a class to build a listing of webform entities.

Namespace

Drupal\webform

Code

public function buildHeader() {
  $header['title'] = [
    'data' => $this
      ->t('Title'),
    'specifier' => 'title',
    'field' => 'title',
    'sort' => 'asc',
  ];
  $header['description'] = [
    'data' => $this
      ->t('Description'),
    'class' => [
      RESPONSIVE_PRIORITY_LOW,
    ],
    'specifier' => 'description',
    'field' => 'description',
  ];
  $header['category'] = [
    'data' => $this
      ->t('Category'),
    'class' => [
      RESPONSIVE_PRIORITY_LOW,
    ],
    'specifier' => 'category',
    'field' => 'category',
  ];
  $header['status'] = [
    'data' => $this
      ->t('Status'),
    'class' => [
      RESPONSIVE_PRIORITY_LOW,
    ],
    'specifier' => 'status',
    'field' => 'status',
  ];
  $header['owner'] = [
    'data' => $this
      ->t('Author'),
    'class' => [
      RESPONSIVE_PRIORITY_LOW,
    ],
    'specifier' => 'uid',
    'field' => 'uid',
  ];
  $header['results'] = [
    'data' => $this
      ->t('Results'),
    'class' => [
      RESPONSIVE_PRIORITY_MEDIUM,
    ],
    'specifier' => 'results',
    'field' => 'results',
  ];
  $header['operations'] = [
    'data' => $this
      ->t('Operations'),
  ];
  return $header;
}