Merge pull request #11881 from yashodha/CRM-21854
[civicrm-core.git] / Civi.php
index fe16326de75dec4adc5e30a6069cdb2cd449e869..ae5dc6f4b1dda2f1a883542edbb0ec98c17b14dc 100644 (file)
--- a/Civi.php
+++ b/Civi.php
@@ -54,6 +54,15 @@ class Civi {
     return Civi\Core\Container::singleton();
   }
 
+  /**
+   * Get the event dispatcher.
+   *
+   * @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
+   */
+  public static function dispatcher() {
+    return Civi\Core\Container::singleton()->get('dispatcher');
+  }
+
   /**
    * @return \Civi\Core\Lock\LockManager
    */