本文整理汇总了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;
}
}
示例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();
}
示例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();
}