public function NodeListBuilder::buildHeader in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/NodeListBuilder.php \Drupal\node\NodeListBuilder::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()
File
- core/
modules/ node/ src/ NodeListBuilder.php, line 74 - Contains \Drupal\node\NodeListBuilder.
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 = array(
'title' => $this
->t('Title'),
'type' => array(
'data' => $this
->t('Content type'),
'class' => array(
RESPONSIVE_PRIORITY_MEDIUM,
),
),
'author' => array(
'data' => $this
->t('Author'),
'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();
}