Own CodonEvents

Hello,

 

is it possible to create own CodonEvents and then add Listeners to this created event? For example the existing event “bid_added”. I want to create a new one “updated_flight”.

Is there anywhere a Codon documentation? I can’t find one.

 

I tried to just Dispatch an event and listen to it but this doesn’t work for me…

CodonEvent::Dispatch('updated\_flight', 'ACARSData', $flight\_info);

 

public function \_\_construct() { CodonEvent::addListener('Test', array('bid\_added', 'updated\_flight')); } public function EventListener($eventinfo) { if($eventinfo[0] == 'bid\_added') { //something } if($eventinfo[0] == 'updated\_flight') { TestData::test($eventinfo[2]); } }

Thanks!

Are you trying to update using the database?