当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveRecord::beforeDelete方法代码示例

本文整理汇总了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();
 }
开发者ID:EurekaSolutions,项目名称:sistemanc,代码行数:7,代码来源:Procedimientos.php

示例2: getArrayLanguage

 public static function getArrayLanguage()
 {
     if ($this->default) {
         return false;
     }
     return parent::beforeDelete();
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:7,代码来源:LanguageModel.php

示例3: beforeDelete

 public function beforeDelete()
 {
     foreach ($this->productos as $c) {
         $c->delete();
     }
     return parent::beforeDelete();
 }
开发者ID:EurekaSolutions,项目名称:sistemanc,代码行数:7,代码来源:Facturas.php

示例4: beforeDelete

 function beforeDelete()
 {
     parent::beforeDelete();
     if ($this->delete_ids) {
         Group::model()->deleteAll(array('id' => $this->delete_ids));
     }
     return true;
 }
开发者ID:hiproz,项目名称:mincms,代码行数:8,代码来源:Group.php

示例5: beforeDelete

 public function beforeDelete()
 {
     if (parent::beforeDelete()) {
         foreach ($this->data as $data) {
             $data->delete();
         }
         return true;
     }
     return false;
 }
开发者ID:nizsheanez,项目名称:kur.ru,代码行数:10,代码来源:Metric.php

示例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();
 }
开发者ID:EurekaSolutions,项目名称:sistemanc,代码行数:10,代码来源:PresupuestoImportacion.php

示例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;
 }
开发者ID:nizsheanez,项目名称:kur.ru,代码行数:13,代码来源:Sector.php

示例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();
 }
开发者ID:YiiCoded,项目名称:yii-ecommerce,代码行数:15,代码来源:Theme.php

示例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();
 }
开发者ID:YiiCoded,项目名称:yii-ecommerce,代码行数:17,代码来源:PersonalMessageTopic.php

示例10: beforeDelete

 public function beforeDelete()
 {
     foreach ($this->fieldData as $field) {
         $field->delete();
     }
     return parent::beforeDelete();
 }
开发者ID:YiiCoded,项目名称:yii-ecommerce,代码行数:7,代码来源:UserCustomField.php

示例11: beforeDelete

 public function beforeDelete()
 {
     foreach ($this->presupuestoPartidaProyecto as $c) {
         $c->delete();
     }
     return parent::beforeDelete();
 }
开发者ID:EurekaSolutions,项目名称:sistemanc,代码行数:7,代码来源:Proyectos.php

示例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();
 }
开发者ID:YiiCoded,项目名称:yii-ecommerce,代码行数:9,代码来源:Language.php

示例13: beforeDelete

 public function beforeDelete()
 {
     /*	    foreach($this->importado as $c)
            $c->delete();*/
     return parent::beforeDelete();
 }
开发者ID:EurekaSolutions,项目名称:sistemanc,代码行数:6,代码来源:PresupuestoProductos.php

示例14: beforeDelete

	protected function beforeDelete() 
	{
		if(parent::beforeDelete()) {
			$this->blog->delete();
			return true;
		} else {
			return false;
		}
	}
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:9,代码来源:User.php

示例15: beforeDelete

 public function beforeDelete()
 {
     Person::model()->loadModel($this->id)->delete();
     return parent::beforeDelete();
 }
开发者ID:jacjimus,项目名称:furahia_mis,代码行数:5,代码来源:Child.php


注:本文中的ActiveRecord::beforeDelete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。