Beispiel #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);
     // 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);
     // remove session of message settings after saving to db
     $session->remove('csetting');
     $session->remove('csetting_default');
     return parent::afterSave($insert, $changedAttributes);
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 public function beforeSave($insert)
 {
     return parent::beforeSave($insert);
 }