Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

18 rindas
488B

  1. <?php
  2. namespace common\logic\User\UserProducer\Event;
  3. use common\logic\User\UserProducer\Wrapper\UserProducerManager;
  4. use justcoded\yii2\eventlistener\observers\ActiveRecordObserver;
  5. use yii\db\AfterSaveEvent;
  6. class PaymentObserver extends ActiveRecordObserver
  7. {
  8. public function inserted(AfterSaveEvent $event)
  9. {
  10. $payment = $event->sender;
  11. $userProducerManager = UserProducerManager::getInstance();
  12. $userProducerManager->updateCredit($payment);
  13. }
  14. }