本文整理汇总了PHP中PhoneNumber::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP PhoneNumber::delete方法的具体用法?PHP PhoneNumber::delete怎么用?PHP PhoneNumber::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhoneNumber
的用法示例。
在下文中一共展示了PhoneNumber::delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: beforeDelete
/**
* (non-PHPdoc)
* @see Model::beforeDelete()
*/
function beforeDelete($cascade = true)
{
App::import('Model', 'PhoneNumber');
$my_model = new PhoneNumber();
$this->recursive = 1;
$businessDetail = $this->find('first', array('conditions' => array('BusinessDetail.id' => $this->id)));
$this->_business_delete_id = $businessDetail['BusinessDetail']['businesses_id'];
foreach ($businessDetail['PhoneNumber'] as $phone) {
$my_model->delete($phone['id']);
}
return true;
}
示例2: PhoneNumber
<?php
ob_start();
require_once "includes/functions.php";
$phoneNumber = new PhoneNumber();
if (array_key_exists('delete_phone_numbers', $_POST)) {
$insert_id = $_POST['insert_id'];
$phoneNumber->delete();
header("Location: portfolio.php?insert_id=" . $insert_id);
}
if (array_key_exists('modify_phone_numbers', $_POST)) {
$phoneNumbers = $phoneNumber->getPhoneNumbersFromPhoneId($_POST);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Phone Number Update</title>
</head>
<body>
<div class="container">
<ul class="nav">
<li><a href="listcontacts.php">List of All Contacts</a></li>
</ul>
<div class="header">
</div><!-- end .header -->
<div class="content">