Пример #1
0
 public function afterSave($insert, $changedAttributes)
 {
     $this->toggleWebhook();
     return parent::afterSave($insert, $changedAttributes);
 }
Пример #2
0
 /**
  * Update member card after save member.
  * @see \yii\db\BaseActiveRecord::afterSave($insert, $changedAttributes)
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($insert) {
         $this->attachBehavior('MembershipDiscountBehavior', new MembershipDiscountBehavior());
         $this->operationCoupon($this);
     }
 }
Пример #3
0
 /**
  * Update member card after save member.
  * @see \yii\db\BaseActiveRecord::afterSave($insert, $changedAttributes)
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($insert) {
         $member = Member::findByPk($this->memberId);
         if (!empty($member)) {
             $member->upgradeCard();
         }
     }
 }