You are here

public function LingotekInterfaceTranslationService::getAllLocalDocumentIds in Lingotek Translation 3.8.x

Same name and namespace in other branches
  1. 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()
  2. 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()
  3. 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()
  4. 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()
  5. 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()
  6. 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()
  7. 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::getAllLocalDocumentIds()

Gets all local document ids.

Return value

string[] Gets all local document ids.

Overrides LingotekInterfaceTranslationServiceInterface::getAllLocalDocumentIds

File

src/LingotekInterfaceTranslationService.php, line 969

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

public function getAllLocalDocumentIds() {
  $state = \Drupal::state();
  $translations_metadata = $state
    ->get('lingotek.interface_translations_metadata');
  $docIds = [];
  if ($translations_metadata) {
    foreach ($translations_metadata as $component => $componentMetadata) {
      $docIds[] = $componentMetadata['document_id'];
    }
  }
  return $docIds;
}