コード例 #1
0
 /**
  * After save attributes
  */
 protected function afterSave()
 {
     parent::afterSave();
     if ($this->isNewRecord) {
         if ($this->author_phone != '') {
             $contact = new OmmuAuthorContact();
             $contact->author_id = $this->author_id;
             $contact->type = 1;
             $contact->contact = $this->author_phone;
             $contact->save();
         }
     }
 }