Commit | Line | Data |
---|---|---|
4bcd4c62 TO |
1 | <?php |
2 | /** | |
3 | * @file | |
4 | * | |
5 | * Configure settings on the newly populated database. | |
6 | */ | |
7 | ||
8 | if (!defined('CIVI_SETUP')) { | |
9 | exit("Installation plugins must only be loaded by the installer.\n"); | |
10 | } | |
11 | ||
12 | \Civi\Setup::dispatcher() | |
13 | ->addListener('civi.setup.installDatabase', function (\Civi\Setup\Event\InstallDatabaseEvent $e) { | |
14 | foreach ($e->getModel()->settings as $settingKey => $settingValue) { | |
15 | \Civi\Setup::log()->info(sprintf('[%s] Set value of %s', basename(__FILE__), $settingKey)); | |
16 | ||
17 | \Civi::settings()->set($settingKey, $settingValue); | |
18 | } | |
19 | }, \Civi\Setup::PRIORITY_LATE + 100); |