示例#1
0
 /**
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     $session = Yii::$app->session;
     $msetting_session = $session->get('msetting');
     $csetting_session = $session->get('csetting');
     // save messages configruation for this client
     // MCSetting::saveSettingsChanged($msetting_session, new Msetting, $this->id);
     $msetting = new Msetting();
     $msetting->saveSettingsChanged($msetting_session, $msetting, $this->id);
     // remove session of message settings after saving to db
     $session->remove('msetting');
     $session->remove('msetting_default');
     // save checklist configruatiion for this client
     // MCSetting::saveSettingsChanged($csetting_session, new Csetting, $this->id);
     $csetting = new Csetting();
     $csetting->saveSettingsChanged($csetting_session, $csetting, $this->id);
     // remove session of message settings after saving to db
     $session->remove('csetting');
     $session->remove('csetting_default');
     return parent::afterSave($insert, $changedAttributes);
 }