5 * This is an example plugin which manipulates the installation options.
7 * Note: The filename `Example.disabled.php` indicates that the example is
8 * a disabled. A real plugin must end in `*.civi-setup.php`.
11 if (!defined('CIVI_SETUP')) {
12 exit("Installation plugins must only be loaded by the installer.\n");
15 \Civi\Setup
::dispatcher()
16 ->addListener('civi.setup.init', function (\Civi\Setup\Event\InitEvent
$e) {
17 \Civi\Setup
::log()->info(sprintf('[%s] Handle %s', basename(__FILE__
), 'init'));
19 // Override the default list of Civi components.
20 $e->getModel()->components
= array('CiviEvent', 'CiviContribute', 'CiviMember', 'CiviMail');
22 // Activate some extensions during installation.
23 $e->getModel()->extensions
[] = 'org.civicrm.flexmailer';
25 // Manipulate some settings during installation.
26 $e->getModel()->settings
['max_attachments'] = 10;