public function StateListBuilder::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/ StateListBuilder.php, line 50 - Contains \Drupal\bat_event\StateListBuilder.
Class
- StateListBuilder
- Provides a listing of State entities.
Namespace
Drupal\bat_eventCode
public function buildHeader() {
$header['id'] = $this
->t('State ID');
$header['name'] = $this
->t('Name');
$header['color'] = $this
->t('Color');
$header['calendar_label'] = $this
->t('Calendar label');
$header['blocking'] = $this
->t('Blocking');
$header['event_type'] = $this
->t('Event type');
$header = [
'id' => [
'data' => $this
->t('State ID'),
'field' => 'id',
'specifier' => 'id',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'name' => [
'data' => $this
->t('Name'),
'field' => 'name',
'specifier' => 'name',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'color' => [
'data' => $this
->t('Color'),
'field' => 'color',
'specifier' => 'color',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'calendar_label' => [
'data' => $this
->t('Calendar label'),
'field' => 'calendar_label',
'specifier' => 'calendar_label',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'blocking' => [
'data' => $this
->t('Blocking'),
'field' => 'blocking',
'specifier' => 'blocking',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'event_type' => [
'data' => $this
->t('Event type'),
'field' => 'event_type',
'specifier' => 'event_type',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
];
return $header + parent::buildHeader();
}