本文整理匯總了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;
?>