protected function LingotekManagementForm::getHeaders in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 4.0.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.0.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.1.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.2.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.3.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.5.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.6.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.7.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
- 3.8.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm::getHeaders()
Return value
string[]
Overrides LingotekManagementFormBase::getHeaders
File
- src/
Form/ LingotekManagementForm.php, line 27
Class
- LingotekManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
protected function getHeaders() {
$entity_type = $this->entityTypeManager
->getDefinition($this->entityTypeId);
$properties = $this->entityFieldManager
->getBaseFieldDefinitions($this->entityTypeId);
$has_bundles = $entity_type
->get('bundle_entity_type') != 'bundle';
if ($has_bundles) {
$headers['bundle'] = $entity_type
->getBundleLabel();
}
$headers += [
'title' => $has_bundles && $entity_type
->hasKey('label') ? $properties[$entity_type
->getKey('label')]
->getLabel() : $entity_type
->getLabel(),
'source' => $this
->t('Source'),
'translations' => $this
->t('Translations'),
'profile' => $this
->t('Profile'),
'job_id' => $this
->t('Job ID'),
];
return $headers;
}