You are here

function lingotek_legacy_set_translation_status in Lingotek Translation 8.2

1 call to lingotek_legacy_set_translation_status()
lingotek_update_8011 in ./lingotek.install
Migrate Lingotek content metadata from fields to its own entity.

File

./lingotek.install, line 1040
Install, update and uninstall functions for the Lingotek module.

Code

function lingotek_legacy_set_translation_status(&$metadata, $value) {
  $statuses = json_decode($value);
  foreach ($statuses as $langcode => $status) {
    $metadata->translation_status
      ->appendItem([
      'language' => $langcode,
      'value' => $status,
    ]);
  }
}