You are here

public function OrderListBuilder::buildHeader in Commerce Core 8.2

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/order/src/OrderListBuilder.php, line 55

Class

OrderListBuilder
Defines the list builder for orders.

Namespace

Drupal\commerce_order

Code

public function buildHeader() {
  $header = [
    'order_id' => [
      'data' => $this
        ->t('Order ID'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'type' => [
      'data' => $this
        ->t('Type'),
      'class' => [
        RESPONSIVE_PRIORITY_MEDIUM,
      ],
    ],
    'customer' => [
      'data' => $this
        ->t('Customer'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'state' => [
      'data' => $this
        ->t('State'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'created' => [
      'data' => $this
        ->t('Created'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
  ];
  return $header + parent::buildHeader();
}