You are here

function opigno_course_update_8005 in Opigno course 8

Implements hook_update_N().

Update field.field.media.image_png.field_media_image config (delete unnecessary dependencies)

File

./opigno_course.install, line 157
Install, update and uninstall functions for the Opigno Course module.

Code

function opigno_course_update_8005() {

  // Install configs from optional folder.
  $config_optional_path = drupal_get_path('module', 'opigno_course') . '/config/optional';
  $storage = new FileStorage($config_optional_path);
  $config_storage = \Drupal::service('config.storage');
  $data = $storage
    ->read('field.field.media.image_png.field_media_image');
  $config_storage
    ->write('field.field.media.image_png.field_media_image', $data);
}