You are here

public function ProfileListBuilder::buildHeader in Profile 2 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 62
Contains \Drupal\profile\ProfileListController.

Class

ProfileListBuilder
List controller for profiles.

Namespace

Drupal\profile

Code

public function buildHeader() {
  $header = array(
    'label' => $this
      ->t('Label'),
    'type' => array(
      'data' => $this
        ->t('Type'),
      'class' => array(
        RESPONSIVE_PRIORITY_MEDIUM,
      ),
    ),
    'owner' => array(
      'data' => $this
        ->t('Owner'),
      '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();
}