public function TranslatorListBuilder::buildHeader in Translation Management Tool 8
Builds the header row for the entity listing.
Return value
array A render array structure of header strings.
Overrides DraggableListBuilder::buildHeader
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
Entity/ ListBuilder/ TranslatorListBuilder.php, line 77
Class
- TranslatorListBuilder
- Provides a listing of translators.
Namespace
Drupal\tmgmt\Entity\ListBuilderCode
public function buildHeader() {
$header['label'] = t('Label');
$header['logo'] = t('Provider');
$installed_translators = $this->translatorManager
->getLabels();
if (empty($installed_translators)) {
$this
->messenger()
->addError(t("There are no provider plugins available. Please install a provider plugin."));
}
return $header + parent::buildHeader();
}