Last active
October 3, 2016 01:53
-
-
Save geerlingguy/66b19e5e5450f069abe992d5e804842e to your computer and use it in GitHub Desktop.
Example of hook_uninstall() for migration-related module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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