You are here

function thunder_update_8316 in Thunder 6.2.x

Uninstall thunder_liveblog.

File

./thunder.install, line 195
Install, update and uninstall functions for the thunder installation profile.

Code

function thunder_update_8316() {
  $configFactory = \Drupal::configFactory();
  $liveblogNodeConfig = $configFactory
    ->getEditable('field.field.node.liveblog.field_paragraphs');
  if (!$liveblogNodeConfig
    ->isNew()) {
    $liveblogNodeConfig
      ->clear('dependencies.enforced')
      ->save();
  }
  $liveblogStorageConfig = $configFactory
    ->getEditable('field.storage.liveblog_post.field_embed_media');
  if (!$liveblogStorageConfig
    ->isNew()) {
    $liveblogStorageConfig
      ->clear('dependencies.enforced')
      ->save();
  }

  /** @var \Drupal\Core\Extension\ModuleInstallerInterface $moduleInstaller */
  $moduleInstaller = \Drupal::service('module_installer');
  $moduleInstaller
    ->uninstall([
    'thunder_liveblog',
  ]);
}