本文整理汇总了PHP中ActiveRecord::beforeDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::beforeDelete方法的具体用法?PHP ActiveRecord::beforeDelete怎么用?PHP ActiveRecord::beforeDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecord
的用法示例。
在下文中一共展示了ActiveRecord::beforeDelete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: beforeDelete
public function beforeDelete()
{
foreach ($this->facturas as $c) {
$c->delete();
}
return parent::beforeDelete();
}
示例2: getArrayLanguage
public static function getArrayLanguage()
{
if ($this->default) {
return false;
}
return parent::beforeDelete();
}
示例3: beforeDelete
public function beforeDelete()
{
foreach ($this->productos as $c) {
$c->delete();
}
return parent::beforeDelete();
}
示例4: beforeDelete
function beforeDelete()
{
parent::beforeDelete();
if ($this->delete_ids) {
Group::model()->deleteAll(array('id' => $this->delete_ids));
}
return true;
}
示例5: beforeDelete
public function beforeDelete()
{
if (parent::beforeDelete()) {
foreach ($this->data as $data) {
$data->delete();
}
return true;
}
return false;
}
示例6: beforeDelete
public function beforeDelete()
{
// Eliminar todos los codigos arancelarios del producto
if (!$this->scenario == 'eliminarproducto') {
foreach ($this->findAllByAttributes(array('presupuesto_partida_id' => $this->presupuesto_partida_id, 'producto_id' => $this->producto_id)) as $c) {
$c->delete();
}
}
return parent::beforeDelete();
}
示例7: beforeDelete
public function beforeDelete()
{
if (parent::beforeDelete()) {
foreach ($this->data as $item) {
$item->delete();
}
foreach ($this->polygons as $item) {
$item->delete();
}
return true;
}
return false;
}
示例8: beforeDelete
/**
* Before delete event
*/
public function beforeDelete()
{
// Delete all theme files first
ThemeFile::model()->deleteAll('theme_id=:id', array(':id' => $this->id));
// Delete theme folder with all files
$path = Yii::getPathOfAlias('application.www.themes');
$themeDir = $path . '/' . $this->dirname;
if (is_dir($themeDir)) {
recursiveDirRemove($themeDir);
}
return parent::beforeDelete();
}
示例9: beforeDelete
/**
* Before Delete event
*
*/
public function beforeDelete()
{
foreach ($this->replies as $reply) {
$reply->delete();
}
foreach ($this->participants as $participant) {
$participant->delete();
}
foreach ($this->notifications as $notification) {
$notification->delete();
}
return parent::beforeDelete();
}
示例10: beforeDelete
public function beforeDelete()
{
foreach ($this->fieldData as $field) {
$field->delete();
}
return parent::beforeDelete();
}
示例11: beforeDelete
public function beforeDelete()
{
foreach ($this->presupuestoPartidaProyecto as $c) {
$c->delete();
}
return parent::beforeDelete();
}
示例12: beforeDelete
/**
* Before delete event
*/
public function beforeDelete()
{
// Delete all messages first
Message::model()->deleteAll('language_id=:id', array(':id' => $this->id));
return parent::beforeDelete();
}
示例13: beforeDelete
public function beforeDelete()
{
/* foreach($this->importado as $c)
$c->delete();*/
return parent::beforeDelete();
}
示例14: beforeDelete
protected function beforeDelete()
{
if(parent::beforeDelete()) {
$this->blog->delete();
return true;
} else {
return false;
}
}
示例15: beforeDelete
public function beforeDelete()
{
Person::model()->loadModel($this->id)->delete();
return parent::beforeDelete();
}