本文整理汇总了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);