Handlers are what drive custom module development in LiveWhale. In a sense, every handler is a window of opportunity in the CMS’s operation into which you can insert custom code. Any custom module will use one or more handlers. You can also create custom handlers.
Note: This handler documentation is a work in progress.
See here for a recent list of all available handlers.
Click the name of a handler below for information and code examples.
Name | Description | Arguments | Frontend | Backend | Scope |
---|---|---|---|---|---|
onAfterPublicSubmission | Fires immediately after an item is created by a public submission form. | $data_type, $last_id | X | application | |
onAfterSync | Fires immediately after an item is created or updated that originates from a synced source (1.6.2+) | $type, $subscription_id, $event_id, $mode, $item | X | application | |
onBeforeOutput | Filters an entire page's contents at runtime (before widgets parsed) | $buffer | X | X | application |
onBeforeSync | Fires immediately before an item is created or updated that originates from a synced source | $type, $subscription_id, $buffer | X | application | |
onBeforeValidate | Fires before a saved item is validated | $data_type, $id | X | application | |
onCSVOutput | Filters an exported CSV (1.6.2+) | $data_type, $rows | X | application | |
onFormatMessageVars | Filters variables before they are placed into a message or email (1.6.2+) | $vars | X | X | application |
onFormatPublicSubmission | Filters a public submission before it's saved | $data_type, $buffer | X | application | |
onFormsSubmission | A form created in the forms module was submitted | $id | X | X | application |
onFormsSuccess | Filters the success message output of a submitted form (1.6.2+) | $buffer, $form_id | X | application | |
onFormsSuccessData | Fires immediately after a form created in the forms module was successfully submitted | $data, $form_id | X | application | |
onOutput | Filters an entire page's contents at runtime (after widgets parsed) | $buffer | X | X | application |
onValidatePublicSubmission | Validate a public submission. | $data_type | X | application | |
onValidateUpload | Validating content before it's uploaded. (1.6.2+) | $data_type, $info | X | application | |
onWidgetFormat | Filters a widget's variables before they are displayed. | $type, $handler, $buffer | X | application |