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


PHP BaseActiveRecordVersioned::beforeDelete方法代碼示例

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


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

示例1: beforeDelete

 /**
  * Delete commissioning body assignments for referential integrity
  * Note if patients are assigned to the practice, there will still be
  * a referential integrity error and the delete will fail.
  *
  * @return bool
  */
 protected function beforeDelete()
 {
     if (parent::beforeDelete()) {
         foreach ($this->commissioningbodyassigments as $cba) {
             $cba->delete();
         }
         return true;
     }
 }
開發者ID:openeyes,項目名稱:openeyes,代碼行數:16,代碼來源:Practice.php

示例2: beforeDelete

 /**
  * ensure we keep track of path to file before deleting from database
  *
  * @return bool
  * (non-PHPdoc)
  * @see BaseActiveRecord::beforeDelete()
  */
 public function beforeDelete()
 {
     $this->_stored_path = $this->getPath();
     return parent::beforeDelete();
 }
開發者ID:code-4-england,項目名稱:OpenEyes,代碼行數:12,代碼來源:ProtectedFile.php

示例3: beforeDelete

 /**
  * Dissociate the session from cancelled bookings and ERODs before deletion.
  */
 protected function beforeDelete()
 {
     OphTrOperationbooking_Operation_Booking::model()->updateAll(array('session_id' => null), 'session_id = :session_id and booking_cancellation_date is not null', array(':session_id' => $this->id));
     OphTrOperationbooking_Operation_EROD::model()->updateAll(array('session_id' => null), 'session_id = :session_id', array(':session_id' => $this->id));
     return parent::beforeDelete();
 }
開發者ID:openeyes,項目名稱:openeyes,代碼行數:9,代碼來源:OphTrOperationbooking_Operation_Session.php


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