You are here

protected function SourcePluginUiBase::getLanguageHeader in Translation Management Tool 8

Gets languages form header.

Return value

array Array with the languages for the header.

2 calls to SourcePluginUiBase::getLanguageHeader()
ConfigSourcePluginUi::overviewFormHeader in sources/tmgmt_config/src/ConfigSourcePluginUi.php
Gets overview form header.
ContentEntitySourcePluginUi::overviewFormHeader in sources/content/src/ContentEntitySourcePluginUi.php
Gets overview form header.

File

src/SourcePluginUiBase.php, line 237

Class

SourcePluginUiBase
Default ui controller class for source plugin.

Namespace

Drupal\tmgmt

Code

protected function getLanguageHeader() {
  $languages = array();
  foreach (\Drupal::languageManager()
    ->getLanguages() as $langcode => $language) {
    $languages['langcode-' . $langcode] = array(
      'data' => $language
        ->getName(),
    );
  }
  return $languages;
}