function system_post_update_uninstall_classy

Uninstall Classy if it is no longer needed.

File

core/modules/system/system.post_update.php, line 120

Code

function system_post_update_uninstall_classy() {
  /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
  $theme_installer = \Drupal::getContainer()->get('theme_installer');
  try {
    $theme_installer->uninstall([
      'classy',
    ]);
  } catch (\InvalidArgumentException|UnknownExtensionException $exception) {
    // Exception is thrown if Classy wasn't installed or if there are themes
    // depending on it.
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.