|
Open Monograph Press
3.3.0
|
Public Member Functions | |
| __construct () | |
| _getSearchSql ($searchType, $search, $searchMatch, &$params) | |
| _returnFromRow ($row) | |
| assignGroupToStage ($contextId, $userGroupId, $stageId) | |
| assignUserToGroup ($userId, $groupId) | |
| contextHasGroup ($contextId, $userGroupId) | |
| deleteAssignmentsByContextId ($contextId, $userId=null) | |
| deleteAssignmentsByUserGroupId ($userGroupId) | |
| deleteAssignmentsByUserId ($userId, $userGroupId=null) | |
| deleteByContextId ($contextId) | |
| deleteById ($contextId, $userGroupId) | |
| deleteObject ($userGroup) | |
| deleteSettingsByLocale ($locale) | |
| getAdditionalFieldNames () | |
| getAssignedStagesByUserGroupId ($contextId, $userGroupId) | |
| getByContextId ($contextId=null, $dbResultRange=null) | |
| getById ($userGroupId, $contextId=null) | |
| getByRoleId ($contextId, $roleId, $default=false, $dbResultRange=null) | |
| getByUserId ($userId, $contextId=null) | |
| getContextUsersCount ($contextId, $userGroupId=null, $roleId=null) | |
| getDefaultByRoleId ($contextId, $roleId) | |
| getInsertId () | |
| getLocaleFieldNames () | |
| getPermitMetadataEditGroupIds ($contextId, $roleId=null) | |
| getRecommendOnlyGroupIds ($contextId, $roleId=null) | |
| getSetting ($userGroupId, $name, $locale=null) | |
| getUserGroupIdsByRoleId ($roleId, $contextId=null) | |
| getUserGroupsByStage ($contextId, $stageId, $roleId=null, $dbResultRange=null) | |
| getUsersByContextId ($contextId, $searchType=null, $search=null, $searchMatch=null, $dbResultRange=null) | |
| getUsersById ($userGroupId=null, $contextId=null, $searchType=null, $search=null, $searchMatch=null, $dbResultRange=null) | |
| getUsersNotInRole ($roleId, $contextId=null, $search=null, $rangeInfo=null) | |
| insertObject ($userGroup) | |
| installLocale ($locale, $contextId=null) | |
| installSettings ($contextId, $filename) | |
| isDefault ($userGroupId) | |
| newDataObject () | |
| removeAllStagesFromGroup ($contextId, $userGroupId) | |
| removeGroupFromStage ($contextId, $userGroupId, $stageId) | |
| removeUserFromGroup ($userId, $groupId, $contextId) | |
| updateLocaleFields ($userGroup) | |
| updateObject ($userGroup) | |
| updateSetting ($userGroupId, $name, $value, $type=null, $isLocalized=false) | |
| userAssignmentExists ($contextId, $userId, $stageId) | |
| userGroupAssignedToStage ($userGroupId, $stageId) | |
| userInAnyGroup ($userId, $contextId=null) | |
| userInGroup ($userId, $userGroupId) | |
Public Member Functions inherited from DAO | |
| __construct ($dataSource=null, $callHooks=true) | |
| concat () | |
| convertFromDB ($value, $type) | |
| convertToDB ($value, &$type) | |
| dateFromDB ($d) | |
| datetimeFromDB ($dt) | |
| datetimeToDB ($dt) | |
| dateToDB ($d) | |
| flushCache () | |
| formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
| getAffectedRows () | |
| getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
| getDataSource () | |
| getDirectionMapping ($direction) | |
| getDriver () | |
| getType ($value) | |
| handleError ($dataSource, $sql) | |
| nullOrInt ($value) | |
| replace ($table, $arrFields, $keyCols) | |
| & | retrieve ($sql, $params=false, $callHooks=true) |
| & | retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true) |
| & | retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true) |
| & | retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true) |
| setCacheDir () | |
| setDataSource ($dataSource) | |
| update ($sql, $params=false, $callHooks=true, $dieOnError=true) | |
| updateDataObjectSettings ($tableName, $dataObject, $idArray) | |
Static Public Member Functions | |
| static | getNotChangeMetadataEditPermissionRoles () |
Static Public Member Functions inherited from DAO | |
| static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
Data Fields | |
| $userDao | |
| $userGroupAssignmentDao | |
Data Fields inherited from DAO | |
| $_dataSource | |
Additional Inherited Members | |
Protected Member Functions inherited from DAO | |
| _getInsertId ($table='', $id='') | |
Operations for retrieving and modifying User Groups and user group assignments.
Definition at line 21 of file UserGroupDAO.inc.php.
| UserGroupDAO::__construct | ( | ) |
| UserGroupDAO::_getSearchSql | ( | $searchType, | |
| $search, | |||
| $searchMatch, | |||
| & | $params | ||
| ) |
private function to assemble the SQL for searching users.
| string | $searchType | the field to search on. |
| string | $search | the keywords to search for. |
| string | $searchMatch | where to match (is, contains, startsWith). |
| array | $params | SQL parameter array reference |
Definition at line 822 of file UserGroupDAO.inc.php.
References DAO\concat().
Referenced by getUsersById().
| UserGroupDAO::_returnFromRow | ( | $row | ) |
Internal function to return a UserGroup object from a row.
| $row | array |
Definition at line 56 of file UserGroupDAO.inc.php.
References HookRegistry\call(), DAO\getDataObjectSettings(), and newDataObject().
Referenced by getById().
| UserGroupDAO::assignGroupToStage | ( | $contextId, | |
| $userGroupId, | |||
| $stageId | |||
| ) |
Assign a user group to a stage
| $contextId | int |
| $userGroupId | int |
| $stageId | int |
Definition at line 612 of file UserGroupDAO.inc.php.
References DAO\update().
Referenced by installSettings().
| UserGroupDAO::assignUserToGroup | ( | $userId, | |
| $groupId | |||
| ) |
Assign a given user to a given user group
| int | $userId | |
| int | $groupId |
Definition at line 572 of file UserGroupDAO.inc.php.
| UserGroupDAO::contextHasGroup | ( | $contextId, | |
| $userGroupId | |||
| ) |
Validation check to see if user group exists for a given context
| $contextId | |
| $userGroupId |
Definition at line 383 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::deleteAssignmentsByContextId | ( | $contextId, | |
$userId = null |
|||
| ) |
Remove all user group assignments for a given user in a context
| int | $contextId | |
| int | $userId |
Definition at line 563 of file UserGroupDAO.inc.php.
| UserGroupDAO::deleteAssignmentsByUserGroupId | ( | $userGroupId | ) |
Delete all assignments to a given user group
| unknown_type | $userGroupId |
Definition at line 554 of file UserGroupDAO.inc.php.
| UserGroupDAO::deleteAssignmentsByUserId | ( | $userId, | |
$userGroupId = null |
|||
| ) |
Delete all user group assignments for a given userId
| int | $userId |
Definition at line 546 of file UserGroupDAO.inc.php.
| UserGroupDAO::deleteByContextId | ( | $contextId | ) |
Delete a user group by its context id
| $contextId | int |
Definition at line 154 of file UserGroupDAO.inc.php.
References DAO\retrieve(), and DAO\update().
| UserGroupDAO::deleteById | ( | $contextId, | |
| $userGroupId | |||
| ) |
Delete a user group by its id will also delete related settings and all the assignments to this group
| $contextId | int |
| $userGroupId | int |
Definition at line 133 of file UserGroupDAO.inc.php.
References removeAllStagesFromGroup(), and DAO\update().
Referenced by deleteObject().
| UserGroupDAO::deleteObject | ( | $userGroup | ) |
Delete a user group. will also delete related settings and all the assignments to this group
| $userGroup | UserGroup |
Definition at line 145 of file UserGroupDAO.inc.php.
References deleteById().
| UserGroupDAO::deleteSettingsByLocale | ( | $locale | ) |
Remove all settings associated with a locale
| $locale |
Definition at line 810 of file UserGroupDAO.inc.php.
References DAO\update().
| UserGroupDAO::getAdditionalFieldNames | ( | ) |
Get a list of additional field names to store in this DAO. This can be used to extend the table with virtual "columns", typically using the ..._settings table.
Reimplemented from DAO.
Definition at line 187 of file UserGroupDAO.inc.php.
| UserGroupDAO::getAssignedStagesByUserGroupId | ( | $contextId, | |
| $userGroupId | |||
| ) |
Get all stages assigned to one user group in one context.
| $contextId | int The context ID. |
| $userGroupId | int The user group ID |
Definition at line 919 of file UserGroupDAO.inc.php.
References WorkflowStageDAO\getTranslationKeyFromId(), and DAO\retrieve().
Referenced by removeAllStagesFromGroup().
| UserGroupDAO::getByContextId | ( | $contextId = null, |
|
$dbResultRange = null |
|||
| ) |
Retrieve user groups for a given context (all contexts if null)
| Integer | $contextId | (optional) |
| DBResultRange | $dbResultRange | (optional) |
Definition at line 407 of file UserGroupDAO.inc.php.
References DAO\retrieveRange().
Referenced by installLocale().
| UserGroupDAO::getById | ( | $userGroupId, | |
$contextId = null |
|||
| ) |
Get an individual user group
| $userGroupId | int User group ID |
| $contextId | int Optional context ID to use for validation |
Definition at line 209 of file UserGroupDAO.inc.php.
References _returnFromRow(), and DAO\retrieve().
| UserGroupDAO::getByRoleId | ( | $contextId, | |
| $roleId, | |||
$default = false, |
|||
$dbResultRange = null |
|||
| ) |
Get all user groups belonging to a role
| Integer | $contextId | |
| Integer | $roleId | |
| boolean | $default | (optional) |
| DBResultRange | $dbResultRange | (optional) |
Definition at line 261 of file UserGroupDAO.inc.php.
References DAO\retrieveRange().
Referenced by getDefaultByRoleId().
| UserGroupDAO::getByUserId | ( | $userId, | |
$contextId = null |
|||
| ) |
Retrieve user groups to which a user is assigned.
| $userId | int |
| $contextId | int |
Definition at line 361 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::getContextUsersCount | ( | $contextId, | |
$userGroupId = null, |
|||
$roleId = null |
|||
| ) |
Retrieve the number of users associated with the specified context.
| $contextId | int |
Definition at line 427 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::getDefaultByRoleId | ( | $contextId, | |
| $roleId | |||
| ) |
Get a single default user group with a particular roleId
| $contextId | int Context ID |
| $roleId | int ROLE_ID_... |
Definition at line 227 of file UserGroupDAO.inc.php.
References getByRoleId().
| UserGroupDAO::getInsertId | ( | ) |
Get the ID of the last inserted user group.
Definition at line 172 of file UserGroupDAO.inc.php.
References DAO\_getInsertId().
Referenced by insertObject().
| UserGroupDAO::getLocaleFieldNames | ( | ) |
Get field names for which data is localized.
Reimplemented from DAO.
Definition at line 180 of file UserGroupDAO.inc.php.
|
static |
Get a list of roles not able to change submissionMetadataEdit permission option.
Definition at line 1046 of file UserGroupDAO.inc.php.
Referenced by Upgrade\changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit(), UserGroupForm\execute(), and UserGroupForm\fetch().
| UserGroupDAO::getPermitMetadataEditGroupIds | ( | $contextId, | |
$roleId = null |
|||
| ) |
Get all user group IDs with permit_metadata_edit option enabled.
| $contextId | integer |
| $roleId | integer (optional) |
Definition at line 1019 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::getRecommendOnlyGroupIds | ( | $contextId, | |
$roleId = null |
|||
| ) |
Get all user group IDs with recommendOnly option enabled.
| $contextId | integer |
| $roleId | integer (optional) |
Definition at line 990 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::getSetting | ( | $userGroupId, | |
| $name, | |||
$locale = null |
|||
| ) |
Retrieve a context setting value.
| $userGroupId | int |
| $name | string |
| $locale | string optional |
Definition at line 682 of file UserGroupDAO.inc.php.
References DAO\convertFromDB(), and DAO\retrieve().
Referenced by installLocale().
| UserGroupDAO::getUserGroupIdsByRoleId | ( | $roleId, | |
$contextId = null |
|||
| ) |
Get an array of user group ids belonging to a given role
| $roleId | int ROLE_ID_... |
| $contextId | int Context ID |
Definition at line 283 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::getUserGroupsByStage | ( | $contextId, | |
| $stageId, | |||
$roleId = null, |
|||
$dbResultRange = null |
|||
| ) |
Get the user groups assigned to each stage.
| int | $contextId | Context ID |
| int | $stageId | WORKFLOW_STAGE_ID_... |
| int | $roleId | Optional ROLE_ID_... to filter results by |
| DBResultRange | (optional) $dbResultRange |
Definition at line 893 of file UserGroupDAO.inc.php.
References DAO\retrieveRange().
| UserGroupDAO::getUsersByContextId | ( | $contextId, | |
$searchType = null, |
|||
$search = null, |
|||
$searchMatch = null, |
|||
$dbResultRange = null |
|||
| ) |
return an Iterator of User objects given the search parameters
| int | $contextId | |
| string | $searchType | |
| string | $search | |
| string | $searchMatch | |
| DBResultRange | $dbResultRange |
Definition at line 456 of file UserGroupDAO.inc.php.
References getUsersById().
| UserGroupDAO::getUsersById | ( | $userGroupId = null, |
|
$contextId = null, |
|||
$searchType = null, |
|||
$search = null, |
|||
$searchMatch = null, |
|||
$dbResultRange = null |
|||
| ) |
return an Iterator of User objects given the search parameters
| int | $userGroupId | optional |
| int | $contextId | optional |
| string | $searchType | |
| string | $search | |
| string | $searchMatch | |
| DBResultRange | $dbResultRange |
Definition at line 506 of file UserGroupDAO.inc.php.
References _getSearchSql(), and DAO\retrieveRange().
Referenced by getUsersByContextId().
| UserGroupDAO::getUsersNotInRole | ( | $roleId, | |
$contextId = null, |
|||
$search = null, |
|||
$rangeInfo = null |
|||
| ) |
Find users that don't have a given role
| $roleId | ROLE_ID_... int (const) |
| $contextId | int Optional context ID |
| $search | string Optional search string |
| $rangeInfo | RangeInfo Optional range info |
Definition at line 468 of file UserGroupDAO.inc.php.
References DAO\retrieveRange().
| UserGroupDAO::insertObject | ( | $userGroup | ) |
Insert a user group.
| $userGroup | UserGroup |
Definition at line 78 of file UserGroupDAO.inc.php.
References getInsertId(), DAO\update(), and updateLocaleFields().
Referenced by installSettings().
| UserGroupDAO::installLocale | ( | $locale, | |
$contextId = null |
|||
| ) |
use the locale keys stored in the settings table to install the locale settings
| $locale | |
| $contextId |
Definition at line 783 of file UserGroupDAO.inc.php.
References getByContextId(), getSetting(), and updateSetting().
Referenced by installSettings().
| UserGroupDAO::installSettings | ( | $contextId, | |
| $filename | |||
| ) |
Load the XML file and move the settings to the DB
| $contextId | |
| $filename |
Definition at line 720 of file UserGroupDAO.inc.php.
References assignGroupToStage(), DAORegistry\getDAO(), insertObject(), installLocale(), newDataObject(), and updateSetting().
| UserGroupDAO::isDefault | ( | $userGroupId | ) |
Check whether the passed user group id is default or not.
| $userGroupId | Integer |
Definition at line 238 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::newDataObject | ( | ) |
create new data object (allows DAO to be subclassed)
Definition at line 47 of file UserGroupDAO.inc.php.
Referenced by _returnFromRow(), and installSettings().
| UserGroupDAO::removeAllStagesFromGroup | ( | $contextId, | |
| $userGroupId | |||
| ) |
Delete all stage assignments in a user group.
| $contextId | int |
| $userGroupId | int |
Definition at line 599 of file UserGroupDAO.inc.php.
References getAssignedStagesByUserGroupId(), and removeGroupFromStage().
Referenced by deleteById().
| UserGroupDAO::removeGroupFromStage | ( | $contextId, | |
| $userGroupId, | |||
| $stageId | |||
| ) |
Remove a user group from a stage
| $contextId | int |
| $userGroupId | int |
| $stageId | int |
Definition at line 625 of file UserGroupDAO.inc.php.
References DAO\update().
Referenced by removeAllStagesFromGroup().
| UserGroupDAO::removeUserFromGroup | ( | $userId, | |
| $groupId, | |||
| $contextId | |||
| ) |
remove a given user from a given user group
| $userId | int |
| $groupId | int |
| $contextId | int |
Definition at line 585 of file UserGroupDAO.inc.php.
| UserGroupDAO::updateLocaleFields | ( | $userGroup | ) |
Update the localized data for this object
| $author | object |
Definition at line 198 of file UserGroupDAO.inc.php.
References DAO\updateDataObjectSettings().
Referenced by insertObject(), and updateObject().
| UserGroupDAO::updateObject | ( | $userGroup | ) |
Update a user group.
| $userGroup | UserGroup |
Definition at line 103 of file UserGroupDAO.inc.php.
References DAO\update(), and updateLocaleFields().
| UserGroupDAO::updateSetting | ( | $userGroupId, | |
| $name, | |||
| $value, | |||
$type = null, |
|||
$isLocalized = false |
|||
| ) |
Method for updatea userGroup setting
| $userGroupId | int |
| $name | string |
| $value | mixed |
| $type | string data type of the setting. If omitted, type will be guessed |
| $isLocalized | boolean |
Definition at line 643 of file UserGroupDAO.inc.php.
References DAO\convertToDB(), DAO\replace(), and DAO\update().
Referenced by installLocale(), and installSettings().
| UserGroupDAO::userAssignmentExists | ( | $contextId, | |
| $userId, | |||
| $stageId | |||
| ) |
Check to see whether a user is assigned to a stage ID via a user group.
| $contextId | int |
| $userId | int |
| $staeId | int |
Definition at line 966 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::userGroupAssignedToStage | ( | $userGroupId, | |
| $stageId | |||
| ) |
Check if a user group is assigned to a stage
| int | $userGroupId | |
| int | $stageId |
Definition at line 944 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::userInAnyGroup | ( | $userId, | |
$contextId = null |
|||
| ) |
Check if a user is in any user group
| $userId | int |
| $contextId | int optional |
Definition at line 336 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| UserGroupDAO::userInGroup | ( | $userId, | |
| $userGroupId | |||
| ) |
Check if a user is in a particular user group
| $contextId | int |
| $userId | int |
| $userGroupId | int |
Definition at line 312 of file UserGroupDAO.inc.php.
References DAO\retrieve().
| a UserGroupDAO::$userDao |
shortcut to get the UserDAO *
Definition at line 26 of file UserGroupDAO.inc.php.
| a UserGroupDAO::$userGroupAssignmentDao |
shortcut to get the UserGroupAssignmentDAO *
Definition at line 32 of file UserGroupDAO.inc.php.