You are here

function search404_uninstall in Search 404 8

Same name and namespace in other branches
  1. 5 search404.install \search404_uninstall()
  2. 6 search404.install \search404_uninstall()
  3. 7 search404.install \search404_uninstall()
  4. 2.x search404.install \search404_uninstall()

Implements hook_uninstall().

File

./search404.install, line 18
Install, update and uninstall functions for the search404 module.

Code

function search404_uninstall() {
  $site_404 = \Drupal::config('system.site')
    ->get('page.404');
  if ($site_404 == '/search404') {
    \Drupal::configFactory()
      ->getEditable('system.site')
      ->clear('page.404')
      ->save();
  }
}