Development Guide

Raising Events

This documentation is only relevant for IILIAS 4.3.x and above. This is a work in progress.

To raise an event use the following code (in your application layer):

1
2
global $ilAppEventHandler;
$ilAppEventHandler->raise("Services/Tracking", "updateStatus", array(...));

This way all registered listeners of the component Services/Tracking will be notified for the event updateStatus. You should add all relevant data for the event to the 3rd parameter.
 
There is no information available to the calling component which or if any listeners are notified.

Please add all events your component is raising to the respective module.xml or service.xml:

1
2
3
4
5
6
7
8
<?php xml version = "1.0" encoding = "UTF-8"?>
<module ...>
...
<events>
<event type="raise" id="updateStatus" />
</events>
...
</module>

If necessary you can set the id of the (raising) component manually:

1
2
3
4
5
6
7
8
<?php xml version = "1.0" encoding = "UTF-8"?>
<module ...>
...
<events>
<event type="raise" id="updateStatus" component="Services/Tracking" />
</events>
...
</module>