X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a274406038e13cf678e14d65dfa70d04ead67206..refs/pull/3391/head:/app/Theming/ThemeEvents.php diff --git a/app/Theming/ThemeEvents.php b/app/Theming/ThemeEvents.php index 1965556a9..ce99c817c 100644 --- a/app/Theming/ThemeEvents.php +++ b/app/Theming/ThemeEvents.php @@ -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'; }