public function TranslatorListBuilder::buildHeader

File

src/Entity/ListBuilder/TranslatorListBuilder.php, line 77

Class

TranslatorListBuilder
Provides a listing of translators.

Namespace

Drupal\tmgmt\Entity\ListBuilder

Code

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();
}