function NodeListBuilder::buildHeader
Same name in other branches
- 9 core/modules/node/src/NodeListBuilder.php \Drupal\node\NodeListBuilder::buildHeader()
- 8.9.x core/modules/node/src/NodeListBuilder.php \Drupal\node\NodeListBuilder::buildHeader()
- 11.x core/modules/node/src/NodeListBuilder.php \Drupal\node\NodeListBuilder::buildHeader()
Overrides EntityListBuilder::buildHeader
1 call to NodeListBuilder::buildHeader()
- ModeratedNodeListBuilder::buildHeader in core/
modules/ content_moderation/ src/ ModeratedNodeListBuilder.php
1 method overrides NodeListBuilder::buildHeader()
- ModeratedNodeListBuilder::buildHeader in core/
modules/ content_moderation/ src/ ModeratedNodeListBuilder.php
File
-
core/
modules/ node/ src/ NodeListBuilder.php, line 61
Class
- NodeListBuilder
- Defines a class to build a listing of node entities.
Namespace
Drupal\nodeCode
public function buildHeader() {
// Enable language column and filter if multiple languages are added.
$header = [
'title' => $this->t('Title'),
'type' => [
'data' => $this->t('Content type'),
'class' => [
RESPONSIVE_PRIORITY_MEDIUM,
],
],
'author' => [
'data' => $this->t('Author'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'status' => $this->t('Status'),
'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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.