https://github.com/bircher/drupal-config_import_n
proof of concept hook_post_config_import_NAME module
https://github.com/bircher/drupal-config_import_n
Last synced: 8 months ago
JSON representation
proof of concept hook_post_config_import_NAME module
- Host: GitHub
- URL: https://github.com/bircher/drupal-config_import_n
- Owner: bircher
- Created: 2017-03-22T09:52:31.000Z (over 9 years ago)
- Default Branch: 8.x-1.x
- Last Pushed: 2017-05-31T16:41:51.000Z (about 9 years ago)
- Last Synced: 2025-04-05T02:42:03.946Z (over 1 year ago)
- Size: 3.91 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Config Import N
## Introduction
Drupal core has a `hook_update_N()` mechanism with which developers can fix the
database. But often we also want to abuse it to deploy other changes.
This can lead to the situation that we would like to import the configuration
before running the update hooks. But this is a very bad idea and will not be
possible in the future.
This module introduces two new hooks which should be intuitive to use:
`hook_pre_config_import_NAME` and `hook_pre_config_import_NAME`.
The functions are defined in a file called `.pre_config_import.php` and
`.post_config_import.php` respectively, analogous to `post_update`
hooks. In fact this module uses cores classes to detect and load the functions.
Each function will be run once before or after the configuration import.
A