public function actionEvent() { $component = new Common(); $component->on(Common::EVENT_NOTIFY, [$component, 'notifyAdmin']); $component->sendMail("*****@*****.**", "Test", "Test text"); $component->off(Common::EVENT_NOTIFY, [$component, 'notifyAdmin']); }
public function actionEvent() { $component = new Common(); $component->on(Common::EVENT_NOTIFY, [$component, 'notifyAdmin']); $component->sendMail('*****@*****.**', 'test', 'test test test'); }
public function actionEvent() { $component = new Common(); $component->on(Common::EVENT_NOTIFY, [$component, 'notifyEventHandler']); $component->makeEvent(); }