Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of hook_uninstall() for migration-related module.
<?php
/**
* @file
* Pix migration install file.
*/
/**
* Implements hook_uninstall().
*/
function pix_migrate_uninstall() {
// Delete this module's migrations.
$migrations = [
'pix_file',
'pix_gallery',
'pix_image',
'pix_name',
'pix_user',
];
foreach ($migrations as $migration) {
Drupal::configFactory()->getEditable('migrate_plus.migration.' . $migration)->delete();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.