To learn more about how events work, see the Craft documentation on events (opens new window).
Raised before an editor submits an entry for approval. Event handlers can prevent the submission from getting sent by setting $event->performAction
to false.
Params:
craft()->on('comments.onBeforeSaveSubmission', function($event) {
$submission = $event->params['submission'];
$event->performAction = false;
});
Raised after an editor submits an entry for approval.
Params:
craft()->on('comments.onSaveSubmission', function($event) {
$submission = $event->params['submission'];
});
Raised before a publisher approves an entry. Event handlers can prevent the submission from being approved by setting $event->performAction
to false.
Params:
craft()->on('comments.onBeforeApproveSubmission', function($event) {
$submission = $event->params['submission'];
$event->performAction = false;
});
Raised after a publisher has approved an entry.
Params:
craft()->on('comments.onApproveSubmission', function($event) {
$submission = $event->params['submission'];
});