You are here

public function EventListBuilder::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_event/src/EventListBuilder.php, line 60
Contains \Drupal\bat_event\EventListBuilder.

Class

EventListBuilder
Defines a class to build a listing of Event entities.

Namespace

Drupal\bat_event

Code

public function buildHeader() {
  $header = [
    'id' => [
      'data' => $this
        ->t('Event ID'),
      'field' => 'id',
      'specifier' => 'id',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'start_date' => [
      'data' => $this
        ->t('Start Date'),
      'field' => 'event_dates',
      'specifier' => 'start',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'end_date' => [
      'data' => $this
        ->t('End Date'),
      'field' => 'event_dates',
      'specifier' => 'end',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'type' => [
      'data' => $this
        ->t('Type'),
      'field' => 'type',
      'specifier' => 'type',
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
  ];
  return $header + parent::buildHeader();
}