You are here

public function ProfileListBuilder::buildHeader in Profile 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/ProfileListBuilder.php, line 81

Class

ProfileListBuilder
List controller for profiles.

Namespace

Drupal\profile

Code

public function buildHeader() {
  $header = [
    'label' => $this
      ->t('Label'),
    'type' => [
      'data' => $this
        ->t('Type'),
      'class' => [
        RESPONSIVE_PRIORITY_MEDIUM,
      ],
    ],
    'owner' => [
      'data' => $this
        ->t('Owner'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
    'status' => $this
      ->t('Status'),
    'is_default' => $this
      ->t('Default'),
    'changed' => [
      'data' => $this
        ->t('Updated'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ],
  ];
  if (\Drupal::languageManager()
    ->isMultilingual()) {
    $header['language_name'] = [
      'data' => $this
        ->t('Language'),
      'class' => [
        RESPONSIVE_PRIORITY_LOW,
      ],
    ];
  }
  return $header + parent::buildHeader();
}