5 * Activate Civi components on the newly populated database.
8 if (!defined('CIVI_SETUP')) {
9 exit("Installation plugins must only be loaded by the installer.\n");
12 \Civi\Setup
::dispatcher()
13 ->addListener('civi.setup.installDatabase', function (\Civi\Setup\Event\InstallDatabaseEvent
$e) {
14 \Civi\Setup
::log()->info('[InstallComponents.civi-setup.php] Activate components: ' . implode(" ", $e->getModel()->components
));
16 if (empty($e->getModel()->components
)) {
17 throw new \
Exception("System must have at least one active component.");
20 \Civi
::settings()->set('enable_components', $e->getModel()->components
);
21 }, \Civi\Setup
::PRIORITY_LATE +
300);