devel:event:action_handle_subscribe
Table of Contents
ACTION_HANDLE_SUBSCRIBE
- Description:
- handle, process & generate data for a subscribe request
- DefaultAction:
- subscription style, target and action are validated and data (time) is generated
- Preventable:
- yes
- Added:
- 2010-01-20
This event is signaled by act_subscription() in inc/actions.php when receiving a subscribe request, handlers can use it to allow different subscription styles, targets and actions.
Passed Data
The passed Doku_Event object has the fields: $data
and $result
.
The $data
field is an array with the entries:
- $data['target'] – Target page or namespace ID; Namespaces are denoted by a trailing
:
. - $data['style'] – Subscription style; core allows 'every' and 'digest' for pages and namespaces, and 'list' for namespaces.
- $data['action'] – Subscription action; core knows
subscribe
andunsubscribe
.
In the BEFORE event handler you can modify the $data
field and eventually you can use here preventDefault()
to skip execution of DokuWiki's default subscription_handle_post().
The $result
field is always null because this event has no default action that sets this field. The AFTER event handler let you process the $data
field further after the default processing.
See also
- Code related to this event used in any DokuWiki's files, plugins and templates
devel/event/action_handle_subscribe.txt · Last modified: by torpedo