本文整理匯總了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();
}