ez.no / documentation / ez publish / technical manual / 5.x / features / notifications / notification events

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Notification events

The following three notification events are supported by default:

  • Publish
  • Collaboration
  • Current time


Every time an object is published, a new "ezpublish" event is created.


Every time a collaboration message is generated, a new "ezcollaboration" event is created.

Current time

Every time the " runcronjobs.php" script is executed, a new "ezcurrenttime" event is created. This behavior is specified in the "cronjobs/notification.php" file. The system uses "ezcurrenttime" events for generating digest notifications.

If you need to generate this event manually, add the "notification/runfilter" notation to the URL of your site administration interface and then click the "Spawn time event" button. Please note that the "runfilter" view of the "notification" module should be used only for testing and debugging.

The built-in notification event types are stored in the "kernel/classes/notification/event/" directory. It is possible to extend the system by creating custom notification events for special needs.

Creation and storage

Let's say that you have an article on your site, and a user has subscribed for subtree notifications about this article. Every time a new comment is posted or an updated version of the article is published, the system will generate a new "ezpublish" event and store it in the database. This event can be processed by zero, one, or more notification handlers.


The available notification event types are specified in the "[NotificationEventTypeSettings]" section of the " notification.ini" configuration file located in the "settings" directory. The following settings can be used under this section:

The "RepositoryDirectories[]" array specifies the directories where eZ Publish will search for built in notification event types. The exact location of the event in the directory is specified using the "AvailableNotificationEventTypes" setting.

The "ExtensionDirectories[]" array specifies the extension directories where eZ Publish will search for additional notification event types. By default eZ Publish will search in the "notificationtypes" subdirectory inside your extension. The exact location of the event in this subdirectory is specified with the "AvailableNotificationEventTypes" setting.

The "AvailableNotificationEventTypes[]" array contains a list of event types.

Example 1

The following lines can be specified in the " notification.ini" configuration file:


These settings will make eZ Publish search for the following files for built in notification events:

  • kernel/classes/notification/event/ezpublish/ezpublishtype.php
  • kernel/classes/notification/event/ezcurrenttime/ezcurrenttimetype.php
  • kernel/classes/notification/event/ezcollaboration/ezcollaborationtype.php

Example 2

You can extend the system by creating custom notification events. For example, if you have an extension "nExt" that includes a notification event "nev", put the following lines into an override for " notification.ini" configuration file:




These settings will make eZ Publish expect the additional notification event to be located at "extension/nExt/notificationtypes/nev/nevtype.php"

Please note that you must always clear at least the ini cache in order to make the system re-read the changed configuration files.

Svitlana Shatokhina (14/09/2010 11:50 am)

Geir Arne Waaler (29/09/2010 6:55 am)


There are no comments.