本文整理匯總了PHP中FileData::getDeptRights方法的典型用法代碼示例。如果您正苦於以下問題:PHP FileData::getDeptRights方法的具體用法?PHP FileData::getDeptRights怎麽用?PHP FileData::getDeptRights使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FileData
的用法示例。
在下文中一共展示了FileData::getDeptRights方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
// For the User dropdown
$avail_users = $user_perms_obj->user_obj->getAllUsers($pdo);
// We need to set a form value for the current department so that
// it can be pre-selected on the form
$avail_departments = Department::getAllDepartments($pdo);
$avail_categories = Category::getAllCategories($pdo);
$cats_array = array();
foreach ($avail_categories as $avail_category) {
array_push($cats_array, $avail_category);
}
//////Populate department perm list/////////////////
$dept_perms_array = array();
foreach ($avail_departments as $dept) {
$avail_dept_perms['name'] = $dept['name'];
$avail_dept_perms['id'] = $dept['id'];
$avail_dept_perms['rights'] = $filedata->getDeptRights($dept['id']);
array_push($dept_perms_array, $avail_dept_perms);
}
//////Populate users perm list/////////////////
$user_perms_array = array();
foreach ($avail_users as $user) {
$avail_user_perms['fid'] = $data_id;
$avail_user_perms['first_name'] = $user['first_name'];
$avail_user_perms['last_name'] = $user['last_name'];
$avail_user_perms['id'] = $user['id'];
$avail_user_perms['rights'] = $user_perms_obj->getPermissionForUser($user['id'], $data_id);
array_push($user_perms_array, $avail_user_perms);
}
$GLOBALS['smarty']->assign('file_id', $filedata->getId());
$GLOBALS['smarty']->assign('realname', $filedata->name);
$GLOBALS['smarty']->assign('allDepartments', $avail_departments);