devel:event:infoutil_msg_show
Table of Contents
INFOUTIL_MSG_SHOW
- Description:
- catch calls to msg() to record the message or modify output
- DefaultAction:
- the new message is inserted into display queue and triggers html_msgarea() in certain cases
- Preventable:
- yes
- Added:
- 2020-06-01
This event is signalled by msg() in inc/infoutils.php. Handlers can use it to record message data, modify it, or suppress the default output to implement their own HTML output.
Passed Data
The passed Doku_Event object has the field: $data
.
The $data
field is an array with the entries:
- $data['msg']: $message variable of
msg()
. The message content. May include HTML. - $data['lvl']: $lvl variable of
msg()
. A number that represent message level (-1 error, 0 info, 1 success, 2 notify). - $data['allow']: $allow variable of
msg()
. The user that allows to see the message,MSG_PUBLIC
,MSG_USERS_ONLY
,MSG_MANAGERS_ONLY
, orMSG_ADMINS_ONLY
. - $data['line']: $line variable of
msg
. The default behavior will append this to the end of the message. - $data['file']: $file variable of
msg
. The default behavior will append this to the end of the message.
The BEFORE event let you prevent the default behavior of appending the message to $MSG and displaying it (so you can implement your own), and modifying the data.
The AFTER event happens after the message is saved in $MSG array, and conditionally displayed.
See also
- Code related to this event used in any DokuWiki files, plugins and templates
devel/event/infoutil_msg_show.txt · Last modified: 2020-06-07 07:02 by phy25