aboutsummaryrefslogtreecommitdiff
path: root/documentation/examples/events/trigger.php
blob: 6ce3a76f0945afe0255c6f5f080278b8214dc2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
<?php
/**
 * These two snippets demonstrates triggering an event and how to register for
 * that event.
 */

$object = new ElggObject();
elgg_trigger_event('test', 'example', $object);

// elsewhere a handler could be registered by saying
elgg_register_event_handler('test', 'example', 'example_event_handler');