Triggering event - re-revisited

Triggering event - re-revisited

by Marjan Milošević -
Number of replies: 0

Deeply inside I know it is a noob one, but I still don't get it

I got a block and its code file of course. And I got some lib.php, in which I put some functions. I got some events too. Triggering an event from the block file is easy: I can get context and everything from the block object. But.. What if I want to trigger an event from the lib-file? I don't need to call it from the block. Lets say I got a quiz event-handler I catch in the lib. Then I want to raise the block-event, but from a function also stated in lib. How can I pass the block context and everything? Or am I supposed to do so in the first place?



Average of ratings: -