You are here

protected function LingotekInterfaceTranslationService::getMetadata in Lingotek Translation 3.3.x

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

Returns the component Lingotek metadata.

Parameters

string $component: The component.

Return value

array The metadata.

8 calls to LingotekInterfaceTranslationService::getMetadata()
LingotekInterfaceTranslationService::clearTargetStatuses in src/LingotekInterfaceTranslationService.php
Clear the target statuses.
LingotekInterfaceTranslationService::getDocumentId in src/LingotekInterfaceTranslationService.php
Gets the document id in the Lingotek platform for a given component.
LingotekInterfaceTranslationService::getJobId in src/LingotekInterfaceTranslationService.php
Gets the job ID of a given component.
LingotekInterfaceTranslationService::getTargetStatuses in src/LingotekInterfaceTranslationService.php
Gets the translation statuses of a given component translation for all locales.
LingotekInterfaceTranslationService::setDocumentId in src/LingotekInterfaceTranslationService.php
Sets the Lingotek document id for a given component.

... See full list

File

src/LingotekInterfaceTranslationService.php, line 112

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

protected function getMetadata($component) {
  $state = \Drupal::state();
  $translations_metadata = $state
    ->get('lingotek.interface_translations_metadata');
  $component_metadata = [];
  if ($translations_metadata) {
    if (isset($translations_metadata[$component])) {
      $component_metadata = $translations_metadata[$component];
    }
  }
  return $component_metadata;
}