Can you please post some documentation and examples of creating custom workflow events and custom triggers? I.e., a standard workflow event would be having an administrator approve or deny a request for new user registration on a site. Thanks!
Comments (2 historical)
Written by readers of the earlier documentation sites, kept as they were.
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
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 :)
Cookies on this website
This documentation stores what it needs to work: a session cookie when you sign in or keep a setting such as the help menu shown or hidden, the design you chose (Classic or Modern) and your language. Only if you agree, it also uses Google Analytics (through Google Tag Manager) to count visits; until then nothing is loaded from Google. Your choice is kept in a cookie for 6 months, and you can change it at any time under "Cookie settings" at the foot of every page. Details are in our Cookie Policy.
Always on
The session cookie for signing in and for forms, the cookies that keep your design and language, and the cookie that keeps this choice. They stay on because the website needs them; you can delete them in your browser settings at any time.
Google Analytics, loaded through Google Tag Manager (GTM-MPGWKTQV), counts visits and shows us which pages are read: the pages you open, the page you came from, your browser, device and screen size, and your approximate location derived from your IP address. Google processes the data for us and may transfer it to the USA. It sets the cookies _ga and _ga_* for up to 2 years. Off until you turn it on; when you turn it off again, Google is no longer loaded and these cookies are deleted.
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 :)