You are here

function lingotek_update_8206 in Lingotek Translation 8.2

Install the job_id field definition in Lingotek content metadata.

File

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

Code

function lingotek_update_8206() {
  $fields = [];
  $fields['job_id'] = BaseFieldDefinition::create('string')
    ->setLabel(new TranslatableMarkup('Lingotek job id'))
    ->setDescription(new TranslatableMarkup('The Lingotek job id.'));
  $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
  foreach ($fields as $name => $storage_definition) {
    $entity_definition_update_manager
      ->installFieldStorageDefinition($name, 'lingotek_content_metadata', 'lingotek', $storage_definition);
  }
}