public static delete ( Infusionsoft_Generated_Base &$object, $id, Infusionsoft_App $app = null ) | ||
$object | Infusionsoft_Generated_Base | |
$app | Infusionsoft_App |
public function delete($app = null) { if ($this->Id > 0) { $result = Infusionsoft_DataService::delete($this, $this->Id, $app); Infusionsoft_SdkEventManager::dispatch(new Infusionsoft_SdkEvent($this, array('result' => $result)), 'DataObject.Deleted'); } else { throw new Infusionsoft_Exception("Trying to delete a blank contact"); } return $result; }
<form> table: <input type="text" name="table" value="<?php if (isset($_REQUEST['table'])) { echo htmlspecialchars($_REQUEST['table']); } ?> "><br/> id: <input type="text" name="id" value="<?php if (isset($_REQUEST['id'])) { echo htmlspecialchars($_REQUEST['id']); } ?> "><br/> <input type="submit"> <input type="hidden" name="go"> </form> <?php include '../infusionsoft.php'; include 'testUtils.php'; if (isset($_REQUEST['go'])) { $out = Infusionsoft_DataService::delete($_REQUEST['table'], $_REQUEST['id']); var_dump($out); }