本文整理汇总了PHP中role::has_dependencies方法的典型用法代码示例。如果您正苦于以下问题:PHP role::has_dependencies方法的具体用法?PHP role::has_dependencies怎么用?PHP role::has_dependencies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类role
的用法示例。
在下文中一共展示了role::has_dependencies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: role
$administration_role = new role($_POST['roles_id']);
$administration_role->fill($_POST['roles_name'], $_POST['roles_description'], $_POST['roles_mandatory_ticket_entry'], $_POST['projects_id'], $_POST['categories_id']);
$administration_role->save();
// Clear all values except mPath and projects_id
foreach ($_POST as $key => $value) {
if ($key != 'mPath' && $key != 'projects_id') {
unset($_POST[$key]);
}
}
}
}
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 //