本文整理汇总了PHP中Crud::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Crud::delete方法的具体用法?PHP Crud::delete怎么用?PHP Crud::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Crud
的用法示例。
在下文中一共展示了Crud::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
// no need to retrieve - the key is the file name
$fileName = $this->config->item('page_directory') . $this->get('fileName');
if (file_exists($fileName)) {
unlink($fileName);
}
log_message('error', 'page deleting');
return Crud::delete();
}
示例2: delete
public function delete($data)
{
if (!is_array($data)) {
$id = intval($data);
$data = array('id' => $id);
}
if (!isset($data['id']) or $data['id'] == 0) {
return false;
}
if (!$this->has_permission($data)) {
return;
}
return parent::delete($data);
}
示例3: delete
public function delete()
{
error_log(__METHOD__);
util::acl(1);
parent::delete();
}
示例4: delete
public function delete()
{
foreach ($this->_pages->getPageKeys() as $page) {
$this->_pages->removePage($page);
}
return Crud::delete();
}
示例5: test_delete
/** @expectedException \Exception */
public function test_delete()
{
/** === Call and asserts === */
$this->obj->delete([]);
}
示例6: Crud
<?php
include_once 'model.php';
$readInstantiate = new Crud();
$getData = $readInstantiate->read();
//var_dump($getData);
if (isset($_REQUEST['del_id'])) {
$readInstantiate->delete($_REQUEST['del_id']);
header("location : read.php");
}
?>
<table>
<tr>
<td>S.No.</td>
<td>Name</td>
<td>Address</td>
<td>Phone</td>
<td>Gender</td>
</tr>
<?php
$i = 1;
?>
<?php
foreach ($getData as $key => $value) {
?>
<tr>
<td><?php
echo $i++;
?>
</td>
<td><?php