function tmgmt_update_8005

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::service('extension.list.module')
    ->getPath('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();
}