You are here

protected function PETUIController::overviewTableHeaders in Previewable email templates 7

Generates the table headers for the overview table.

Pretty much a clone of EntityDefaultUIController but adds sorts.

Overrides EntityDefaultUIController::overviewTableHeaders

See also

EntityDefaultUIController::overviewTableHeaders()

1 call to PETUIController::overviewTableHeaders()
PETUIController::overviewTable in ./pet.module
Copy of EntityDefaultUIController::overviewTable() sorts.

File

./pet.module, line 213
Previewable Email Template module.

Class

PETUIController
PET UI controller.

Code

protected function overviewTableHeaders($conditions, $rows = array(), $additional_header = array()) {
  $header = $additional_header;

  // Add a different sort.
  array_unshift($header, array(
    'data' => t('Label'),
    'field' => 'name',
    'sort' => 'asc',
  ));
  if (!empty($this->entityInfo['exportable'])) {
    $header[] = array(
      'data' => t('Status'),
      'field' => 'status',
      'sort' => 'desc',
    );
  }

  // Add operations with the right colspan.
  $header[] = array(
    'data' => t('Operations'),
    'colspan' => $this
      ->operationCount(),
  );
  return $header;
}