當前位置: 首頁>>代碼示例>>PHP>>正文


PHP X2Model::afterSave方法代碼示例

本文整理匯總了PHP中X2Model::afterSave方法的典型用法代碼示例。如果您正苦於以下問題:PHP X2Model::afterSave方法的具體用法?PHP X2Model::afterSave怎麽用?PHP X2Model::afterSave使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在X2Model的用法示例。


在下文中一共展示了X2Model::afterSave方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: afterSave

 public function afterSave()
 {
     if ($this->_originalPost->isNewRecord || $this->_postTextChanged) {
         if ($this->_originalPost->isNewRecord) {
             $this->_originalPost->topicId = $this->id;
             $this->_originalPost->assignedTo = Yii::app()->user->getName();
         }
         $this->_originalPost->updatedBy = Yii::app()->user->getName();
         $this->_originalPost->save();
     }
     return parent::afterSave();
 }
開發者ID:dsyman2,項目名稱:X2CRM,代碼行數:12,代碼來源:Topics.php

示例2: afterSave

 public function afterSave()
 {
     $this->saveMetaData();
     if ($this->reminder) {
         if (!$this->isNewRecord) {
             $this->deleteOldNotifications($this->notificationUsers);
         }
         $this->createNotifications($this->notificationUsers, $this->dueDate - $this->notificationTime * 60, 'action_reminder');
     }
     parent::afterSave();
     $association = X2Model::getAssociationModel($this->associationType, $this->associationId);
     if ($this->isNewRecord && $association && $association->hasAttribute('lastActivity')) {
         $association->lastActivity = time();
         $association->update(array('lastActivity'));
         X2Flow::trigger('RecordUpdateTrigger', array('model' => $association));
     }
 }
開發者ID:tymiles003,項目名稱:X2CRM,代碼行數:17,代碼來源:Actions.php

示例3: afterSave

 /**
  *
  * @return boolean whether or not to save
  */
 public function afterSave()
 {
     $model = $this->getOwner();
     $oldAttributes = $model->getOldAttributes();
     if ($model->escalatedTo != '' && (!isset($oldAttributes['escalatedTo']) || $model->escalatedTo != $oldAttributes['escalatedTo'])) {
         $event = new Events();
         $event->type = 'case_escalated';
         $event->user = $this->updatedBy;
         $event->associationType = 'Services';
         $event->associationId = $model->id;
         if ($event->save()) {
             $notif = new Notification();
             $notif->user = $model->escalatedTo;
             $notif->createDate = time();
             $notif->type = 'escalateCase';
             $notif->modelType = 'Services';
             $notif->modelId = $model->id;
             $notif->save();
         }
     }
     parent::afterSave();
 }
開發者ID:dsyman2,項目名稱:X2CRM,代碼行數:26,代碼來源:Services.php

示例4: afterSave

 public function afterSave()
 {
     if ($this->type == 'dynamic' && isset($this->criteriaInput)) {
         $this->processCriteria();
     }
     return parent::afterSave();
 }
開發者ID:xl602,項目名稱:X2CRM,代碼行數:7,代碼來源:X2List.php

示例5: afterSave

 public function afterSave()
 {
     $this->saveMetaData();
     return parent::afterSave();
 }
開發者ID:keyeMyria,項目名稱:CRM,代碼行數:5,代碼來源:Actions.php


注:本文中的X2Model::afterSave方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。