You are here

public function TransactionListBuilder::buildHeader in Transaction 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

src/TransactionListBuilder.php, line 146

Class

TransactionListBuilder
Provides a entity list page for transactions.

Namespace

Drupal\transaction

Code

public function buildHeader() {
  $header = [
    'description' => $this
      ->t('Description'),
    'created' => [
      'data' => $this
        ->t('Created by'),
    ],
    'executed' => $this
      ->t('Executed by'),
  ];

  // Add transactor fields.
  foreach ($this->extraFields as $field_name => $field_title) {
    $header['field_' . $field_name] = $field_title;
  }
  return $header + parent::buildHeader();
}