Resolve dev/rc#13 by permitting civi.setupui events to be dispatched during install
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 12 Jul 2021 21:58:25 +0000 (07:58 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 12 Jul 2021 21:58:25 +0000 (07:58 +1000)
setup/src/Setup.php

index 5503ae709e1660f534d2cbdfb399e0bdaf61ea2e..0ad56851d802b4c9f86d97e52b155a7587f99356 100644 (file)
@@ -71,7 +71,11 @@ class Setup {
     self::$instance->model = new \Civi\Setup\Model();
     self::$instance->model->setValues($modelValues);
     self::$instance->dispatcher = new CiviEventDispatcher();
-    self::$instance->dispatcher->setDispatchPolicy(['/^civi\.setup\./' => 'run', '/./' => 'fail']);
+    self::$instance->dispatcher->setDispatchPolicy([
+      '/^civi\.setup\./' => 'run',
+      '/^civi\.setupui\./' => 'run',
+      '/./' => 'fail',
+    ]);
     self::$instance->log = $log ? $log : new NullLogger();
 
     $pluginDir = dirname(__DIR__) . '/plugins';