You are here

public function PromotionListBuilder::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()

1 call to PromotionListBuilder::buildHeader()
PromotionListBuilder::buildForm in modules/promotion/src/PromotionListBuilder.php
Form constructor.

File

modules/promotion/src/PromotionListBuilder.php, line 147

Class

PromotionListBuilder
Defines the list builder for promotions.

Namespace

Drupal\commerce_promotion

Code

public function buildHeader() {
  $header['name'] = $this
    ->t('Name');
  $header['usage'] = $this
    ->t('Usage');
  $header['customer_limit'] = $this
    ->t('Per-customer limit');
  $header['start_date'] = $this
    ->t('Start date');
  $header['end_date'] = $this
    ->t('End date');
  if ($this->hasTableDrag) {
    $header['weight'] = $this
      ->t('Weight');
  }
  return $header + parent::buildHeader();
}