public function MessageListBuilder::buildHeader in Message 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/
MessageListBuilder.php, line 56
Class
- MessageListBuilder
- Defines a class to build a listing of Message entities.
Namespace
Drupal\messageCode
public function buildHeader() {
// Enable language column and filter if multiple languages are added.
$header = [
'created' => [
'data' => $this
->t('Created'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'text' => $this
->t('Text'),
'template' => [
'data' => $this
->t('Template'),
'class' => [
RESPONSIVE_PRIORITY_MEDIUM,
],
],
'author' => [
'data' => $this
->t('Author'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
];
if (\Drupal::languageManager()
->isMultilingual()) {
$header['language_name'] = [
'data' => $this
->t('Language'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
];
}
return $header;
}