当前位置: 首页>>代码示例>>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;未经允许,请勿转载。