I have PluginA that needs to listen for something that PluginB does. PluginB needs to include a Model in the event data so that PluginA (and any other subscriber) can pick that up and do whatever it needs to do.
Is that possible right now?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.Sign up to join this community
Yes. It's not documented, but by instantiating the Event class (which is just a thin wrapper for Yii's CEvent) you can create and raise your own events. Obviously you could extend the Event class as well, if need be.
See Aaron Berkowitz' excellent answer to a similar question for details -> https://craftcms.stackexchange.com/a/6941/1098
Also, check out the following resource for more on events in Yii: http://www.yiiframework.com/wiki/327/events-explained