devel:event_handlers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
devel:event_handlers [2023-09-02 01:12] – Klap-in | devel:event_handlers [2023-09-02 13:37] (current) – Klap-in | ||
---|---|---|---|
Line 37: | Line 37: | ||
===== Registering an Event ===== | ===== Registering an Event ===== | ||
- | Event handlers are registered using the '' | + | Event handlers are registered using the [[xref>register_hook()]] function of the [[xref> |
The function definition for '' | The function definition for '' | ||
<code php> | <code php> | ||
Line 52: | Line 52: | ||
==== Global Scope ==== | ==== Global Scope ==== | ||
To call '' | To call '' | ||
- | the global variable | + | the global variable |
<code php> | <code php> | ||
$EVENT_HANDLER-> | $EVENT_HANDLER-> | ||
Line 66: | Line 66: | ||
... | ... | ||
public function register(EventHandler $controller) { | public function register(EventHandler $controller) { | ||
- | $controller-> | + | $controller-> |
+ | | ||
} | } | ||
</ | </ | ||
* The event is [[devel: | * The event is [[devel: | ||
- | * The event handler is '' | + | * The event handler is '' |
* The '' | * The '' | ||
* Finally, the handler is to be called **after** DokuWiki formats the page content. | * Finally, the handler is to be called **after** DokuWiki formats the page content. | ||
Line 100: | Line 101: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
* '' | * '' | ||
- | * protected '' | + | * protected '' |
- | * protected '' | + | * protected '' |
==== Methods ==== | ==== Methods ==== | ||
Line 111: | Line 112: | ||
- '' | - '' | ||
* Calling this method sets '' | * Calling this method sets '' | ||
- | - '' | + | - '' |
- | * This is a global function, not a method of the '' | + | * This is a global function. Calling this function enables the triggering of a user-defined event. Its parameters are as follows: |
* '' | * '' | ||
* '' | * '' |
devel/event_handlers.1693609939.txt.gz · Last modified: 2023-09-02 01:12 by Klap-in