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

Custom Triggers?

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!
  • Re: Custom Triggers?

    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?

      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 :)

Anonymous User (30/06/2005 7:59 pm)

Anonymous User (30/06/2005 8:00 pm)


Comments

  • Re: Custom Triggers?

    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?

      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 :)