TranslationManager::sortTranslators

protected TranslationManager::sortTranslators()

Sorts translators according to priority.

Return value

\Drupal\Core\StringTranslation\Translator\TranslatorInterface[] A sorted array of translator objects.

File

core/lib/Drupal/Core/StringTranslation/TranslationManager.php, line 79

Class

TranslationManager
Defines a chained translation implementation combining multiple translators.

Namespace

Drupal\Core\StringTranslation

Code

protected function sortTranslators() {
  $sorted = array();
  krsort($this->translators);

  foreach ($this->translators as $translators) {
    $sorted = array_merge($sorted, $translators);
  }
  return $sorted;
}
doc_Drupal
2016-10-29 09:49:17
Comments
Leave a Comment

Please login to continue.