You are here

public function SupportTicketListBuilder::buildHeader in Support Ticketing System 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/support_ticket/src/SupportTicketListBuilder.php, line 75
Contains \Drupal\support_ticket\SupportTicketListBuilder.

Class

SupportTicketListBuilder
Defines a class to build a listing of support ticket entities.

Namespace

Drupal\support_ticket

Code

public function buildHeader() {

  // Enable language column and filter if multiple languages are added.
  $header = array(
    'title' => $this
      ->t('Title'),
    'type' => array(
      'data' => $this
        ->t('Content type'),
      'class' => array(
        RESPONSIVE_PRIORITY_MEDIUM,
      ),
    ),
    'author' => array(
      'data' => $this
        ->t('Author'),
      'class' => array(
        RESPONSIVE_PRIORITY_LOW,
      ),
    ),
    'status' => $this
      ->t('Status'),
    'changed' => array(
      'data' => $this
        ->t('Updated'),
      'class' => array(
        RESPONSIVE_PRIORITY_LOW,
      ),
    ),
  );
  if (\Drupal::languageManager()
    ->isMultilingual()) {
    $header['language_name'] = array(
      'data' => $this
        ->t('Language'),
      'class' => array(
        RESPONSIVE_PRIORITY_LOW,
      ),
    );
  }
  return $header + parent::buildHeader();
}