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