You are here

public function WebformOptionsCustomListBuilder::buildHeader in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_options_custom/src/WebformOptionsCustomListBuilder.php \Drupal\webform_options_custom\WebformOptionsCustomListBuilder::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 WebformOptionsCustomListBuilder::buildHeader()
WebformOptionsCustomListBuilder::getEntityIds in modules/webform_options_custom/src/WebformOptionsCustomListBuilder.php
Loads entity IDs using a pager sorted by the entity label (instead of id).

File

modules/webform_options_custom/src/WebformOptionsCustomListBuilder.php, line 134

Class

WebformOptionsCustomListBuilder
Defines a class to build a listing of webform options custom entities.

Namespace

Drupal\webform_options_custom

Code

public function buildHeader() {
  $header['label'] = $this
    ->t('Label / Description');
  $header['category'] = $this
    ->t('Category');
  $header['element'] = $this
    ->t('Element');
  $header['entity_reference'] = $this
    ->t('Entity reference');
  $header['options'] = [
    'data' => $this
      ->t('Options'),
    'class' => [
      RESPONSIVE_PRIORITY_LOW,
    ],
  ];
  $header['used_by'] = [
    'data' => $this
      ->t('Used by'),
    'class' => [
      RESPONSIVE_PRIORITY_LOW,
    ],
  ];
  return $header + parent::buildHeader();
}