Example #1
0
 public function afterSave($ins, $chAttr)
 {
     $Account = Account::findOne(['id' => $this->account_id]);
     $Account->setAttribute('count_autos', self::getAccountCountAutos($this->account_id));
     $Account->save();
     return parent::afterSave($ins, $chAttr);
 }
Example #2
0
 public function afterSave($insert, $attr)
 {
     if ($insert) {
         if ($this->getScenario() == 'client-to-black') {
             $this->relocateImages();
         }
     }
     return parent::afterSave($insert, $attr);
 }
Example #3
0
 public function afterSave($insert, $changedAttributes)
 {
     if (empty($this->userData)) {
         self::createUserData($this->id);
     }
     return parent::afterSave($insert, $changedAttributes);
 }