function image_uninstall
Same name in other branches
- 7.x modules/image/image.install \image_uninstall()
- 9 core/modules/image/image.install \image_uninstall()
- 10 core/modules/image/image.install \image_uninstall()
- 11.x core/modules/image/image.install \image_uninstall()
Implements hook_uninstall().
File
-
core/
modules/ image/ image.install, line 23
Code
function image_uninstall() {
// Remove the styles directory and generated images.
/** @var \Drupal\Core\File\FileSystemInterface $file_system */
$file_system = \Drupal::service('file_system');
try {
$file_system->deleteRecursive(\Drupal::config('system.file')->get('default_scheme') . '://styles');
} catch (FileException $e) {
// Ignore failed deletes.
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.