Skip to the content
Documentation

Custom Triggers? / Workflows / Concepts and basics / 5.x ...

No ratings yet

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)


In this section

Contributors

Comments (2 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. 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

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

Comments

Add a comment

Comments are read by a moderator before they appear.