function mobile_device_detection_uninstall in Mobile Device Detection 8.2
Same name and namespace in other branches
- 8.3 mobile_device_detection.install \mobile_device_detection_uninstall()
- 8 mobile_device_detection.module \mobile_device_detection_uninstall()
Implements hook_uninstall().
File
- ./
mobile_device_detection.install, line 23 - Default install and uninstall functions which set up default data.
Code
function mobile_device_detection_uninstall() {
// Disable mobile_device_detection plugin.
$config = \Drupal::service('config.factory')
->getEditable('views.settings');
$display_extenders = $config
->get('display_extenders') ?: [];
$key = array_search('mobile_device_detection', $display_extenders);
if ($key !== FALSE) {
unset($display_extenders[$key]);
$config
->set('display_extenders', $display_extenders);
$config
->save();
}
}