/** * * * @param unknown $event */ public function preInsert($event) { parent::preInsert($event); if ($this->so_effective_date == '1970-01-01') { $this->so_effective_date = air2_date(); } }
/** * * @param unknown $event */ public function preInsert($event) { $activity = new InquiryActivity(); $activity->ia_actm_id = 42; $activity->ia_desc = 'created by {USER}'; $activity->ia_dtim = air2_date(); $this->InquiryActivity[] = $activity; $author = new InquiryAuthor(); $author->iu_user_id = defined('AIR2_REMOTE_USER_ID') ? AIR2_REMOTE_USER_ID : 1; $this->Author[] = $author; $watcher = new InquiryWatcher(); $watcher->iu_user_id = defined('AIR2_REMOTE_USER_ID') ? AIR2_REMOTE_USER_ID : 1; $this->Watcher[] = $watcher; parent::preInsert($event); }