Registers event listeners. An explanation of events and event listeners can be found here.


Each event listener is described as an <eventlistener> element with a name attribute. As the name attribute has only be introduced with WSC 3.0, it is not yet mandatory to allow backwards compatibility. If name is not given, the system automatically sets the name based on the id of the event listener in the database.


The event class name is the name of the class in which the event is fired.


The event name is the name given when the event is fired to identify different events within the same class. You can either give a single event name or a comma-separated list of event names in which case the event listener listens to all of the listed events.


The listener class name is the name of the class which is triggered if the relevant event is fired. The PHP class has to implement the wcf\system\event\listener\IParameterizedEventListener interface.

Legacy event listeners are only required to implement the deprecated wcf\system\event\IEventListener interface. When writing new code or update existing code, you should always implement the wcf\system\event\listener\IParameterizedEventListener interface!


The inherit value can either be 0 (default value if the element is omitted) or 1 and determines if the event listener is also triggered for child classes of the given event class name. This is the case if 1 is used as the value.


The value of the environment element can either be admin or user and is user if no value is given. The value determines if the event listener will be executed in the frontend (user) or the backend (admin).


The nice value element can contain an integer value out of the interval [-128,127] with 0 being the default value if the element is omitted. The nice value determines the execution order of event listeners. Event listeners with smaller nice values are executed first. If the nice value of two event listeners is equal, they are sorted by the listener class name.

If you pass a value out of the mentioned interval, the value will be adjusted to the closest value in the interval.


The options element can contain a comma-separated list of options of which at least one needs to be enabled for the event listener to be executed.


The permissions element can contain a comma-separated list of permissions of which the active user needs to have at least one for the event listener to be executed.


<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="" xmlns:xsi="" xsi:schemaLocation="">
		<eventlistener name="inheritedAdminExample">
		<eventlistener name="nonInheritedUserExample">
		<eventlistener name="oldEventListenerName" />