1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added webhook_call_before theme event hook

This commit is contained in:
Dan Brown
2022-01-03 18:22:03 +00:00
parent 65830b428c
commit fe54c7f27a
3 changed files with 57 additions and 1 deletions

View File

@ -79,4 +79,20 @@ 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
*/
const WEBHOOK_CALL_BEFORE = 'webhook_call_before';
}