blob: ca27623443d46ad5e473c2c3735b0169dea11f2f (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 | <?php
/**
 * This snippet demonstrates how to register for an event. It dumps the
 * parameters that the handler receives to the screen. The third argument
 * of the handler function is an object that is related to the event. For
 * the 'init', 'system' eveny, it is null.
 */
elgg_register_event_handler('init', 'system', 'example_event_handler');
function example_event_handler($event, $type, $object) {
	var_dump($event);
	var_dump($type);
	var_dump($object);
	return true;
}
 |