devel:event:io_wikipage_read
This is an old revision of the document!
Table of Contents
IO_WIKIPAGE_READ
- Description:
- intercept reading the raw wiki text data
- DefaultAction:
- reads a wiki page
- Preventable:
- no
- Added:
- 2006-07-05
This event is signalled by io_readWikiPage() in inc/io.php. The page content may be modified by action plugins between the disk and DokuWiki.
Passed Data
The Doku_Event object has the fields $data
and $result
.
The $data
field is an array with the entries:
- $data[0] – The raw arguments for io_readFile() as an array. Do not change.
- $data[0][0] – the file path.
- $data[0][1] – whether to convert line endings to unix format, default true.
- $data[1] – ns: The colon separated namespace path minus the trailing page name. (false if root ns)
- $data[2] – page_name: The wiki page name without the namespace.
- $data[3] – rev: The page revision, false for current wiki pages.
In the BEFORE event handler the $data
can be modified, to influence the read action.
In the AFTER event handler the $result
field is available with the read result of the _io_readWikiPage_action() method. The AFTER event handler can modify this field.
Plugins handling this event
The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.
See also
devel/event/io_wikipage_read.1527607270.txt.gz · Last modified: 2018-05-29 17:21 by andi