You are here

function tmgmt_update_8005 in Translation Management Tool 8

Add job items overview.

File

./tmgmt.install, line 74
Update function for the tmgmt module.

Code

function tmgmt_update_8005() {
  $overview = file_get_contents(drupal_get_path('module', 'tmgmt') . '/config/install/views.view.tmgmt_translation_all_job_items.yml');
  $values = Yaml::decode($overview);
  $storage_controller = \Drupal::entityTypeManager()
    ->getStorage('view');
  $storage_controller
    ->create($values)
    ->save();
}