You are here

public function UnitListBuilder::buildHeader in Booking and Availability Management Tools for Drupal 8

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()

File

modules/bat_unit/src/UnitListBuilder.php, line 50
Contains \Drupal\bat_unit\UnitListBuilder.

Class

UnitListBuilder
Defines a class to build a listing of Unit entities.

Namespace

Drupal\bat_unit

Code

public function buildHeader() {
  $header = [
    'id' => [
      'data' => $this
        ->t('Unit ID'),
      'field' => 'id',
      'specifier' => 'id',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'name' => [
      'data' => $this
        ->t('Name'),
      'field' => 'name',
      'specifier' => 'name',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'type' => [
      'data' => $this
        ->t('Type'),
      'field' => 'type',
      'specifier' => 'type',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'status' => [
      'data' => $this
        ->t('Status'),
      'field' => 'status',
      'specifier' => 'status',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
  ];
  return $header + parent::buildHeader();
}