-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from discoverygarden/dev-IMT78
Move away from config entities
- Loading branch information
Showing
10 changed files
with
123 additions
and
3 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
modules/islandora_spreadsheet_ingest_example/islandora_spreadsheet_ingest_example.install
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Misc (un)installation/update hooks. | ||
*/ | ||
|
||
/** | ||
* Remove config entities. | ||
*/ | ||
function islandora_spreadsheet_ingest_example_update_8100() { | ||
$storage = \Drupal::service('entity_type.manager')->getStorage('isi_request'); | ||
$requests = $storage->loadMultiple(); | ||
|
||
$entities = [ | ||
'migrate_plus.migration.isi_file', | ||
'migrate_plus.migration.isi_media_audio', | ||
'migrate_plus.migration.isi_media_doc', | ||
'migrate_plus.migration.isi_media_file', | ||
'migrate_plus.migration.isi_media_image', | ||
'migrate_plus.migration.isi_media_video', | ||
'migrate_plus.migration.isi_node', | ||
]; | ||
|
||
$config_factory = \Drupal::configFactory(); | ||
foreach ($entities as $entity) { | ||
$config_factory->getEditable($entity)->delete(); | ||
} | ||
|
||
// XXX: Resave requests to remove the config dependency. | ||
foreach ($requests as $request) { | ||
$request->save(); | ||
} | ||
|
||
} |
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
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
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
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
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
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
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
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
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