add a hook at point of enqueuing notices
This commit is contained in:
parent
3c89d31b18
commit
5b91223ce4
@ -254,3 +254,10 @@ StartApiRss: after the rss <channel> element is started
|
||||
StartApiAtom: after the <feed> element is started
|
||||
- $action: action object being shown
|
||||
|
||||
StartEnqueueNotice: about to add a notice to the queues (good place to add a new transport)
|
||||
- $notice: the notice being added
|
||||
- &$transports: modifiable list of transports (as strings) to queue for
|
||||
|
||||
EndEnqueueNotice: after adding a notice to the queues
|
||||
- $notice: the notice being added
|
||||
- $transports: modifiable list of transports to use
|
||||
|
@ -915,6 +915,8 @@ function common_enqueue_notice($notice)
|
||||
}
|
||||
}
|
||||
|
||||
if (Event::handle('StartEnqueueNotice', array($notice, &$transports))) {
|
||||
|
||||
$qm = QueueManager::get();
|
||||
|
||||
foreach ($transports as $transport)
|
||||
@ -922,6 +924,9 @@ function common_enqueue_notice($notice)
|
||||
$qm->enqueue($notice, $transport);
|
||||
}
|
||||
|
||||
Event::handle('EndEnqueueNotice', array($notice, $transports));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user