Operations for retrieving and modifying Role objects. More...
Public Member Functions | |
| getByUserId ($userId, $pressId=null) | |
| getByUserIdGroupedByContext ($userId) | |
| getPressUsersRoleCount ($pressId, $roleId) | |
| getRoleIdFromPath ($rolePath) | |
| getRoleNames ($pressOnly=false, $roleIds=null) | |
| getSortMapping ($heading) | |
| & | getUsersByRoleId ($roleId=null, $pressId=null, $searchType=null, $search=null, $searchMatch=null, $dbResultRange=null) |
| RoleDAO () | |
| userHasRole ($pressId, $userId, $roleId) | |
Operations for retrieving and modifying Role objects.
Definition at line 19 of file RoleDAO.inc.php.
| RoleDAO.getByUserId | ( | $ | userId, | |
| $ | pressId = null | |||
| ) |
Return an array of row objects corresponding to the roles a given use has
| $userId | ||
| $pressId |
Definition at line 133 of file RoleDAO.inc.php.
| RoleDAO.getByUserIdGroupedByContext | ( | $ | userId | ) |
Return an array of objects corresponding to the roles a given user has, grouped by context id.
| $userId | int |
Definition at line 161 of file RoleDAO.inc.php.
| RoleDAO.getPressUsersRoleCount | ( | $ | pressId, | |
| $ | roleId | |||
| ) |
Retrieve the number of users with a given role associated with the specified press.
| $pressId | int | |
| $roleId | int |
Definition at line 179 of file RoleDAO.inc.php.
| RoleDAO.getRoleIdFromPath | ( | $ | rolePath | ) |
Get a role's ID based on its path.
| $rolePath | string |
Definition at line 189 of file RoleDAO.inc.php.
| RoleDAO.getRoleNames | ( | $ | pressOnly = false, |
|
| $ | roleIds = null | |||
| ) |
Get a mapping of role keys and i18n key names.
| boolean | $pressOnly If false, also returns site-level roles (Site admin) | |
| array | $roleIds Only return role names of these IDs |
Definition at line 228 of file RoleDAO.inc.php.
Referenced by UserGroupForm.fetch().
| RoleDAO.getSortMapping | ( | $ | heading | ) |
Map a column heading value to a database value for sorting
| string |
Definition at line 213 of file RoleDAO.inc.php.
| & RoleDAO.getUsersByRoleId | ( | $ | roleId = null, |
|
| $ | pressId = null, |
|||
| $ | searchType = null, |
|||
| $ | search = null, |
|||
| $ | searchMatch = null, |
|||
| $ | dbResultRange = null | |||
| ) |
Retrieve a list of users in a specified role.
| $roleId | int optional (can leave as null to get all users in press) | |
| $pressId | int optional, include users only in this press | |
| $searchType | int optional, which field to search | |
| $search | string optional, string to match | |
| $searchMatch | string optional, type of match ('is' vs. 'contains' vs. 'startsWith') | |
| $dbResultRange | object DBRangeInfo object describing range of results to return |
Definition at line 41 of file RoleDAO.inc.php.
| RoleDAO.RoleDAO | ( | ) |
Constructor.
Definition at line 26 of file RoleDAO.inc.php.
| RoleDAO.userHasRole | ( | $ | pressId, | |
| $ | userId, | |||
| $ | roleId | |||
| ) |
Validation check to see if a user belongs to any group that has a given role
| $pressId | ||
| $userId | ||
| $roleId |
Definition at line 111 of file RoleDAO.inc.php.
1.7.1