#461 Add event notification system to core

1.x
closed
nobody
5
2009-06-09
2009-01-24
Greg Meiste
No

It would be useful to have a publish and subscribe event system in the core. This will allow other modules to take action on events that occur.

Examples:

1) A new blog is posted, and the blog module notifies the core of the event. The Twitter module is subscribed to that event, so its callback function is called. The Twitter module then posts a link to the new blog is on the user's twitter status page.

2) A user signs up to the site, and the users module notifies the core of the event. The Mailing Lists module is subscribed to the event, and can automatically add the user to the default mailing list.

The events probably should come with some data, optionally supplied by the publishing module. For example, the new blog's ID, the new user's ID.

This system will make it easier on module developers so they don't have to read the $_REQUEST and $_POST variables to determine when events occur.

Discussion

  • Anonymous - 2009-06-09
    • status: open --> closed
     

Log in to post a comment.