You are here

protected static function IndexBatchHelper::getStringTranslation in Search API 8

Gets the translation manager.

Return value

\Drupal\Core\StringTranslation\TranslationInterface The translation manager.

File

src/IndexBatchHelper.php, line 25

Class

IndexBatchHelper
Provides helper methods for indexing items using Drupal's Batch API.

Namespace

Drupal\search_api

Code

protected static function getStringTranslation() {
  if (!static::$translationManager) {
    static::$translationManager = \Drupal::service('string_translation');
  }
  return static::$translationManager;
}