This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation!
The following three notification events are supported by default:
- 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.
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.
The following lines can be specified in the " notification.ini" configuration file:
[NotificationEventTypeSettings] RepositoryDirectories=kernel/classes/notification/event/ ExtensionDirectories AvailableNotificationEventTypes=ezpublish AvailableNotificationEventTypes=ezcurrenttime AvailableNotificationEventTypes=ezcollaboration
These settings will make eZ Publish search for the following files for built in notification events:
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:
[NotificationEventTypeSettings] ExtensionDirectories=nExt AvailableNotificationEventTypes=nev
[NotificationEventTypeSettings] RepositoryDirectories=extension/nExt/notificationtypes/ AvailableNotificationEventTypes=nev
These settings will make eZ Publish expect the additional notification event to be located at
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 (10/02/2006 9:30 am)
Ricardo Correia (17/04/2013 5:20 pm)