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


PHP Batch::delete方法代码示例

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


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

示例1: deleteRelationship

 /**
  * Delete the given relationship
  *
  * @param Relationship $relationship
  * @return boolean
  */
 public function deleteRelationship(Relationship $relationship)
 {
     if ($this->openBatch) {
         $this->openBatch->delete($relationship);
         return true;
     }
     return $this->runCommand(new Command\DeleteRelationship($this, $relationship));
 }
开发者ID:momoim,项目名称:momo-api,代码行数:14,代码来源:Client.php

示例2: actionDelete

 public function actionDelete()
 {
     if (array_key_exists("batchIds", $_POST)) {
         $batchIds = (array) $_POST["batchIds"];
         $batch = new Batch();
         $batch->organizationId = Yii::app()->user->getOrgId();
         /*this is important to avoid one moderator to edit/delete other org batches*/
         foreach ($batchIds as $bId) {
             $batch->id = $bId;
             $batch->delete();
         }
         $this->render('delete');
     } else {
         Yii::app()->end();
     }
 }
开发者ID:rhl4ttr,项目名称:hello-world,代码行数:16,代码来源:BatchController.php

示例3: testBranchDelete_DeleteManyObjects_ObjectsDeleted

 /**
  * @throws \ValidationException
  * @throws null
  */
 public function testBranchDelete_DeleteManyObjects_ObjectsDeleted()
 {
     $objects = array();
     for ($i = 0; $i < 100; $i++) {
         $human = new Human();
         $human->Name = 'Proud Owner ' . $i;
         $human->write();
         $dog = new Dog();
         $dog->Name = 'Pup ' . $i;
         $dog->Color = 'Fifty Shade No. ' . $i;
         $dog->Owner($human);
         $dog->write();
         $objects[] = $human;
         $objects[] = $dog;
     }
     $batch = new \Batch();
     $batch->delete($objects);
     $this->assertEquals(0, Dog::get()->Count());
     $this->assertEquals(0, Human::get()->Count());
 }
开发者ID:helpfulrobot,项目名称:littlegiant-silverstripe-batchwrite,代码行数:24,代码来源:BatchDeleteTest.php

示例4: verify_oauth_session_exists

<?php

require_once './global.inc.php';
verify_oauth_session_exists();
if (HttpSession::currentUser()->getOrganization()->access_level < 4) {
    echo "Access denied";
    die;
}
$id = $_POST["id"];
$result = Batch::delete($id);
echo json_encode($result);
开发者ID:shiyamalan,项目名称:csespn,代码行数:11,代码来源:admin.batches.delete.php


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