public function PathAliasListBuilder::buildHeader in Drupal 10
Same name and namespace in other branches
- 8 core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::buildHeader()
- 9 core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::buildHeader()
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()
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 131
Class
- PathAliasListBuilder
- Defines a class to build a listing of path_alias entities.
Namespace
Drupal\pathCode
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();
}