示例#1
0
 /**
  * afterSave event
  *
  */
 public function afterSave()
 {
     $this->activity['projectid'] = $this->projectid;
     $this->activity['type'] = Activity::TYPE_TICKET;
     if ($this->isNewRecord) {
         $this->activity['title'] = 'Created a new ticket <strong>{tickettitle}</strong>';
     } else {
         $this->activity['title'] = 'Updated ticket <strong>{tickettitle}</strong>';
     }
     // Append project params
     $this->activity['params'] = array_merge($this->activity['params'], array('{tickettitle}' => $this->getLink()));
     // Activity: New Project
     Activity::log($this->activity);
     return parent::afterSave();
 }
示例#2
0
 /**
  * afterSave event
  *
  */
 public function afterSave()
 {
     $this->activity['projectid'] = $this->projectid;
     $this->activity['type'] = Activity::TYPE_WIKI;
     if ($this->isNewRecord) {
         $this->activity['title'] = 'Created a new wiki page <strong>{pagetitle}</strong>';
     } else {
         $this->activity['title'] = 'Updated the wiki page <strong>{pagetitle}</strong>';
         if ($this->workingrevision) {
             $this->activity['title'] .= ' Revision ' . $this->getRevisionLink();
         }
     }
     // Append project params
     $this->activity['params'] = array_merge($this->activity['params'], array('{pagetitle}' => $this->getLink()));
     // Activity: New Project
     Activity::log($this->activity);
     return parent::afterSave();
 }
示例#3
0
 /**
  * afterSave event
  *
  */
 public function afterSave()
 {
     // @todo add activity log
     return parent::afterSave();
 }