function PathAliasListBuilder::buildHeader

Same name in other branches
  1. 9 core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::buildHeader()
  2. 8.9.x core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::buildHeader()
  3. 11.x core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::buildHeader()

Overrides EntityListBuilder::buildHeader

1 call to PathAliasListBuilder::buildHeader()
PathAliasListBuilder::getEntityIds in core/modules/path/src/PathAliasListBuilder.php
Loads entity IDs using a pager sorted by the entity id.

File

core/modules/path/src/PathAliasListBuilder.php, line 130

Class

PathAliasListBuilder
Defines a class to build a listing of path_alias entities.

Namespace

Drupal\path

Code

public function buildHeader() {
    $header = [
        'alias' => [
            'data' => $this->t('Alias'),
            'field' => 'alias',
            'specifier' => 'alias',
            'sort' => 'asc',
        ],
        'path' => [
            'data' => $this->t('System path'),
            'field' => 'path',
            'specifier' => 'path',
        ],
    ];
    // Enable language column and filter if multiple languages are added.
    if ($this->languageManager
        ->isMultilingual()) {
        $header['language_name'] = [
            'data' => $this->t('Language'),
            'field' => 'langcode',
            'specifier' => 'langcode',
            'class' => [
                RESPONSIVE_PRIORITY_MEDIUM,
            ],
        ];
    }
    return $header + parent::buildHeader();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.