當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。