本文整理汇总了PHP中role::DeleteRoleVariables方法的典型用法代码示例。如果您正苦于以下问题:PHP role::DeleteRoleVariables方法的具体用法?PHP role::DeleteRoleVariables怎么用?PHP role::DeleteRoleVariables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类role
的用法示例。
在下文中一共展示了role::DeleteRoleVariables方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reset
$role_variables = array_merge($role_variables, $data);
}
$role_variables = array_flip($role_variables);
$role->name = $name;
$errors = $role->IsValidData();
if (count($errors) == 0) {
$db = db_class::get_instance();
$db->begin();
$role->Save();
$role->DeleteRoleActions();
reset($role_actions);
$role_action = new role_action();
$role_action->role_id = $role->id_role;
while (list($key, ) = each($role_actions)) {
$role_action->module_action_id = $key;
$role_action->Save();
}
$role->DeleteRoleVariables();
reset($role_variables);
$role_variable = new role_variable();
$role_variable->role_id = $role->id_role;
while (list($key, ) = each($role_variables)) {
$role_variable->variable_id = $key;
$role_variable->Save();
}
$db->commit();
}
}
include SITE_FILE_ROOT . 'template/simple_header.php';
include SITE_FILE_ROOT . 'template/' . $STORAGE['module'] . '/' . $STORAGE['action'] . '.php';
include SITE_FILE_ROOT . 'template/simple_footer.php';