Discussion: Custom Triggers?
Historical. This page holds a discussion from the documentation site of eZ Publish, the system Exponential grew out of. It is kept as it was written, for its history. The comments were written for eZ Publish 3 and 4 and may not apply to Exponential 6.
The current description of the topic is Workflows.
In this section
Contributors
- Massimiliano Bariola Commenter
- Bertrand Dunogier Commenter
- Graham Brookins Updated Maintainer
Comments (2 historical)
Written by readers of the earlier documentation sites, kept as they were.
Re: Custom Triggers?
Massimiliano Bariola ·
Hi,
I second your request. Meanwhile, maybe you could have a look at the worldpay extension, it has a custom event which maybe could get you started.
cheers,
Max
Re: Re: Custom Triggers?
Bertrand Dunogier ·
As far as my knowledge goes, here is how it's done: Exponential module operations are defined in a file called operation_definition.php. Currently there are 2, one for content, and one for shop (kernel/content/operation_definition.php, kernel/shop/operation_definition.php).
These files define operations. I'm not exactly sure how operations are different from views, but the definition is quite similar, except for the complexity. Operations have an additionnal key, 'body', which defines how the operation runs. body is defined by a sequence of methods AND triggers (there we are). For instance, the body for content/read is:
- pre_read (trigger)
- fetch-object (method)
As far as I undertand it, what you have to do to add a custom trigger is replace the view you want to alter by an operation, and add the trigger. I hope it helps :)