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


PHP Model::delete方法代码示例

本文整理汇总了PHP中Phalcon\Mvc\Model::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Model::delete方法的具体用法?PHP Model::delete怎么用?PHP Model::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Phalcon\Mvc\Model的用法示例。


在下文中一共展示了Model::delete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 public function delete()
 {
     foreach ($this->IgoListeValeur as $liste) {
         $liste->delete();
     }
     return parent::delete();
 }
开发者ID:nbtetreault,项目名称:igo,代码行数:7,代码来源:IgoAttribut.php

示例2: delete

 /**
  * 删除模型
  *
  * @return bool
  */
 public function delete()
 {
     if ($cache = static::getCache()) {
         $cache->delete(static::$cacheChildNamespace, array($this->{static::$primaryKey}));
     }
     return parent::delete();
 }
开发者ID:sujinw,项目名称:passport,代码行数:12,代码来源:ModelProvider.php

示例3: delete

 public function delete()
 {
     foreach ($this->IgoGeometrie as $geometrie) {
         $geometrie->delete();
     }
     return parent::delete();
 }
开发者ID:nbtetreault,项目名称:igo,代码行数:7,代码来源:IgoClasseEntite.php

示例4: delete

 public function delete()
 {
     $ref = new ReflectionClass($this);
     if ($ref->hasProperty('deleted_at')) {
         return $this->deleted_at ? true : $this->save(['deleted_at' => date('Y-m-d H:i:s')]);
     } else {
         return parent::delete();
     }
 }
开发者ID:rj28,项目名称:test,代码行数:9,代码来源:Model.php

示例5: delete

 public function delete()
 {
     $response = array();
     if (parent::delete() == false) {
         foreach (parent::getMessages() as $message) {
             $response['errors'][] = (string) $message;
         }
     } else {
         $response['msg'] = 'ok';
     }
     return $response;
 }
开发者ID:Archcry,项目名称:PhalconApiBase,代码行数:12,代码来源:Model.php

示例6: deleteItem

 /**
  * @param Model $item
  *
  * @return bool Deletion succeeded/failed
  */
 protected function deleteItem(Model $item)
 {
     return $item->delete();
 }
开发者ID:huzhaer,项目名称:phalcon-rest,代码行数:9,代码来源:ResourceCrud.php

示例7: delete

 public function delete()
 {
     foreach ($this->IgoCoucheContexte as $groupe) {
         $groupe->delete();
     }
     return parent::delete();
 }
开发者ID:benoitlesp,项目名称:igo,代码行数:7,代码来源:IgoContexte.php

示例8: delete

 public function delete()
 {
     foreach ($this->IgoCouche as $couche) {
         $couche->delete();
     }
     foreach ($this->IgoAttribut as $attribut) {
         $attribut->delete();
     }
     return parent::delete();
 }
开发者ID:nbtetreault,项目名称:igo,代码行数:10,代码来源:IgoGeometrie.php

示例9: delete

 public function delete()
 {
     foreach ($this->IgoCoucheContexte as $groupe) {
         $groupe->delete();
     }
     foreach ($this->IgoPermission as $permission) {
         $permission->delete();
     }
     foreach ($this->IgoClasse as $classe) {
         $classe->delete();
     }
     return parent::delete();
 }
开发者ID:nbtetreault,项目名称:igo,代码行数:13,代码来源:IgoCouche.php

示例10: deleteModel

 /**
  * Elimina el modelo pasado por parametro y carga el mensaje que ha sido pasado por párametro en el flashSession,
  * En caso de error genera una excepción
  * @param \Phalcon\Mvc\Model $model
  * @param String $successMsg
  * @return boolean
  * @throws InvalidArgumentException
  */
 protected function deleteModel($model, $successMsg)
 {
     if ($model->delete()) {
         $this->flashSession->warning($successMsg);
         return true;
     }
     $m = "";
     foreach ($model->getMessages() as $msg) {
         $m .= $msg . "<br>";
     }
     throw new InvalidArgumentException($m);
 }
开发者ID:willmontiel,项目名称:sayvot,代码行数:20,代码来源:ControllerBase.php


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