Merge pull request #16429 from ixiam/dev/core#1113
[civicrm-core.git] / Civi / API / Subscriber / TransactionSubscriber.php
index 5680beec225981c86357655c3fe5dc5afaaf4406..88f34f69b294369dfde2cf9db5b746e51f035dfb 100644 (file)
@@ -34,22 +34,28 @@ class TransactionSubscriber implements EventSubscriberInterface {
    */
   public static function getSubscribedEvents() {
     return [
-      Events::PREPARE => ['onApiPrepare', Events::W_EARLY],
-      Events::RESPOND => ['onApiRespond', Events::W_MIDDLE],
-      Events::EXCEPTION => ['onApiException', Events::W_EARLY],
+      'civi.api.prepare' => ['onApiPrepare', Events::W_EARLY],
+      'civi.api.respond' => ['onApiRespond', Events::W_MIDDLE],
+      'civi.api.exception' => ['onApiException', Events::W_EARLY],
     ];
   }
 
   /**
-   * @var array (scalar $apiRequestId => CRM_Core_Transaction $tx)
+   * List of active transaction objects.
+   *
+   * array(scalar $apiRequestId => CRM_Core_Transaction $tx)
+   *
+   * @var array
    */
   private $transactions = [];
 
   /**
-   * @var array (scalar $apiRequestId => bool)
-   *
-   * A list of requests which should be forcibly rolled back to
+   * (Unused?) A list of requests which should be forcibly rolled back to
    * their save points.
+   *
+   * array (scalar $apiRequestId => bool)
+   *
+   * @var array
    */
   private $forceRollback = [];