diff options
author | cash <cash.costello@gmail.com> | 2011-11-12 14:28:52 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-12 14:28:52 -0500 |
commit | 76bea966f7f93e719ccbf6e2350f647636d4da2a (patch) | |
tree | 87b7b8851b4161be827af5ee9a194fc3553ff29a /documentation/examples/events/trigger.php | |
parent | 88d597c63a9691c9714e9db4dbe676028e548be8 (diff) | |
download | elgg-76bea966f7f93e719ccbf6e2350f647636d4da2a.tar.gz elgg-76bea966f7f93e719ccbf6e2350f647636d4da2a.tar.bz2 |
added better plugin skeleton and added documentation to some of the examples
Diffstat (limited to 'documentation/examples/events/trigger.php')
-rw-r--r-- | documentation/examples/events/trigger.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/documentation/examples/events/trigger.php b/documentation/examples/events/trigger.php new file mode 100644 index 000000000..6ce3a76f0 --- /dev/null +++ b/documentation/examples/events/trigger.php @@ -0,0 +1,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'); |