本文整理汇总了PHP中role::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP role::delete方法的具体用法?PHP role::delete怎么用?PHP role::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类role
的用法示例。
在下文中一共展示了role::delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteall
function deleteall()
{
$menu = $this->input->post('checkinput');
foreach ($menu as $row) {
$role = new role($row);
if (!$role->exists()) {
continue;
}
if ($role->parentmenu_id == NULL) {
$role->delete();
} else {
if ($role->child->count() > 0) {
flash_message('error', 'Vui lòng xóa h?t menu con c?a ' . $role->name);
} else {
// $this->firephp->log("sdf");
$role->delete();
}
}
}
redirect($this->admin . 'roles/list_all');
}
示例2: role
}
}
}
break;
case 'delete_entry':
// Check for dependencies
$administration_role = new role($_POST['roles_id']);
if ($administration_role->has_dependencies()) {
$error_level = 3;
// Related employee-role(s) exist
$_POST['action'] = '';
}
break;
case 'delete_entry_confirmed':
$administration_role = new role($_POST['roles_id']);
$administration_role->delete();
unset($_POST['roles_id']);
$_POST['action'] = '';
break;
}
// Create a new role object with id == 0 (default)
$_SESSION['role'] = new role(0, $_POST['projects_id']);
// header //
require DIR_WS_INCLUDES . 'header.php';
?>
<!-- body //-->
<table style="border-width:0px;width:100%;border-spacing:3">
<tr>
<td style="width:<?php
echo BOX_WIDTH;
?>