]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/ThemeEvents.php
Fixed tests from streaming changes
[bookstack] / app / Theming / ThemeEvents.php
index 1965556a9f13e47f6962cfcedcd0e67431295232..ce99c817cd0a27a57a3e1d0dadc479d31a77d9aa 100644 (file)
@@ -79,4 +79,22 @@ class ThemeEvents
      * @returns \League\CommonMark\ConfigurableEnvironmentInterface|null
      */
     const COMMONMARK_ENVIRONMENT_CONFIGURE = 'commonmark_environment_configure';
+
+    /**
+     * Webhook call before event.
+     * Runs before a webhook endpoint is called. Allows for customization
+     * of the data format & content within the webhook POST request.
+     * Provides the original event name as a string (see \BookStack\Actions\ActivityType)
+     * along with the webhook instance along with the event detail which may be a
+     * "Loggable" model type or a string.
+     * If the listener returns a non-null value, that will be used as the POST data instead
+     * of the system default.
+     *
+     * @param string                                $event
+     * @param \BookStack\Actions\Webhook            $webhook
+     * @param string|\BookStack\Interfaces\Loggable $detail
+     * @param \BookStack\Auth\User                  $initiator
+     * @param int                                   $initiatedTime
+     */
+    const WEBHOOK_CALL_BEFORE = 'webhook_call_before';
 }