当前位置: 首页>>代码示例>>PHP>>正文


PHP X2Model::afterDelete方法代码示例

本文整理汇总了PHP中X2Model::afterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Model::afterDelete方法的具体用法?PHP X2Model::afterDelete怎么用?PHP X2Model::afterDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在X2Model的用法示例。


在下文中一共展示了X2Model::afterDelete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: afterDelete

 public function afterDelete()
 {
     parent::afterDelete();
     // Reset path if name was changed:
     $this->_path = null;
     if (file_exists($this->getPath())) {
         unlink($this->getPath());
     }
     // if theme is deleted which is default, unset default theme setting
     if ($this->id === Yii::app()->settings->defaultTheme) {
         Yii::app()->settings->defaultTheme = null;
         Yii::app()->settings->enforceDefaultTheme = false;
         Yii::app()->settings->save();
     }
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:15,代码来源:Media.php

示例2: afterDelete

 public function afterDelete()
 {
     parent::afterDelete();
     // Reset path if name was changed:
     $this->_path = null;
     if (file_exists($this->getPath())) {
         $media = Media::model()->findByAttributes(array('uploadedBy' => $this->uploadedBy, 'fileName' => $this->fileName));
         // Only delete the file if it is the last media object
         // To use it.
         if (!$media) {
             unlink($this->getPath());
         }
     }
     // if theme is deleted which is default, unset default theme setting
     if ($this->id === Yii::app()->settings->defaultTheme) {
         Yii::app()->settings->defaultTheme = null;
         Yii::app()->settings->enforceDefaultTheme = false;
         Yii::app()->settings->save();
     }
 }
开发者ID:shuvro35,项目名称:X2CRM,代码行数:20,代码来源:Media.php

示例3: afterDelete

 /**
  * Delete associated group to user records 
  */
 public function afterDelete()
 {
     GroupToUser::model()->deleteAll(array('condition' => 'groupId=' . $this->id));
     parent::afterDelete();
 }
开发者ID:dsyman2,项目名称:X2CRM,代码行数:8,代码来源:Groups.php

示例4: afterDelete

 /**
  * Deletes the action reminder event, if any
  * Fires the onAfterDelete event in {@link X2Model::afterDelete}
  */
 public function afterDelete()
 {
     X2Model::model('Events')->deleteAllByAttributes(array('associationType' => 'Actions', 'associationId' => $this->id, 'type' => 'action_reminder'));
     X2Model::model('ActionText')->deleteByPk($this->id);
     parent::afterDelete();
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:10,代码来源:Actions.php

示例5: afterDelete

 public function afterDelete()
 {
     parent::afterDelete();
     // Reset path if name was changed:
     $this->_path = null;
     $this->collectGarbage();
     // if theme is deleted which is default, unset default theme setting
     if ($this->id === Yii::app()->settings->defaultTheme) {
         Yii::app()->settings->defaultTheme = null;
         Yii::app()->settings->enforceDefaultTheme = false;
         Yii::app()->settings->save();
     }
 }
开发者ID:xl602,项目名称:X2CRM,代码行数:13,代码来源:Media.php

示例6: afterDelete

 /**
  * When a list is deleted, remove its entries in x2_list_items
  */
 public function afterDelete()
 {
     CActiveRecord::model('X2ListItem')->deleteAllByAttributes(array('listId' => $this->id));
     // delete all the things!
     parent::afterDelete();
 }
开发者ID:xl602,项目名称:X2CRM,代码行数:9,代码来源:X2List.php


注:本文中的X2Model::afterDelete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。