Gets overview form header.
array Header array definition as expected by theme_tablesort().
public function overviewFormHeader($type) {
$entity_type = \Drupal::entityTypeManager()
->getDefinition($type);
$header = array(
'title' => array(
'data' => $this
->t('Title (in source language)'),
),
);
// Show the bundle if there is more than one for this entity type.
if (count($this
->getTranslatableBundles($type)) > 1) {
$header['bundle'] = array(
'data' => $this
->t('@entity_name type', array(
'@entity_name' => $entity_type
->getLabel(),
)),
);
}
$header += $this
->getLanguageHeader();
return $header;
}