function simple_sitemap_views_uninstall in Simple XML sitemap (Views integration) 8
Implements hook_uninstall().
File
- ./
simple_sitemap_views.install, line 24 - Install and uninstall hooks for the simple_sitemap_views module.
Code
function simple_sitemap_views_uninstall() {
// Disable simple_sitemap_display_extender plugin.
/** @var \Drupal\Core\Config\Config $config */
$config = \Drupal::service('config.factory')
->getEditable('views.settings');
$display_extenders = $config
->get('display_extenders') ?: [];
$key = array_search('simple_sitemap_display_extender', $display_extenders);
if ($key !== FALSE) {
unset($display_extenders[$key]);
$config
->set('display_extenders', $display_extenders);
$config
->save();
}
}