Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
UserGroupAssignmentDAO Class Reference
Inheritance diagram for UserGroupAssignmentDAO:
DAO

Public Member Functions

 _fromRow ($row)
 
 deleteAssignment (&$userGroupAssignment)
 
 deleteAssignmentsByContextId ($contextId, $userId=null)
 
 deleteAssignmentsByUserGroupId ($userGroupId)
 
 deleteByUserId ($userId, $userGroupId=null)
 
 getByUserId ($userId, $contextId=null, $roleId=null)
 
 insertObject ($userGroupAssignment)
 
 newDataObject ()
 
 UserGroupAssignmentDAO ()
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($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)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying user group assignments FIXME: Some of the context-specific features of this class will have to be changed for zero- or double-context applications when user groups are ported over to them.

See Also
UserGroupAssigment

Definition at line 22 of file UserGroupAssignmentDAO.inc.php.

Member Function Documentation

UserGroupAssignmentDAO::_fromRow (   $row)

Internal function to return a UserGroupAssignment object from a row.

Parameters
$rowarray
Returns
Role

Definition at line 43 of file UserGroupAssignmentDAO.inc.php.

References newDataObject().

UserGroupAssignmentDAO::deleteAssignment ( $userGroupAssignment)

Remove an assignment

Parameters
$userGroupAssignment

Definition at line 143 of file UserGroupAssignmentDAO.inc.php.

References DAO\update().

UserGroupAssignmentDAO::deleteAssignmentsByContextId (   $contextId,
  $userId = null 
)

Remove all user group assignments in a given context

Parameters
int$contextId
int$userId

Definition at line 83 of file UserGroupAssignmentDAO.inc.php.

References deleteByUserId(), and DAO\retrieve().

UserGroupAssignmentDAO::deleteAssignmentsByUserGroupId (   $userGroupId)

Remove all user group assignments for a given group

Parameters
int$userGroupId

Definition at line 72 of file UserGroupAssignmentDAO.inc.php.

References DAO\update().

UserGroupAssignmentDAO::deleteByUserId (   $userId,
  $userGroupId = null 
)

Delete all user group assignments for a given userId

Parameters
int$userId
$userGroupIdint optional

Definition at line 56 of file UserGroupAssignmentDAO.inc.php.

References DAO\update().

Referenced by deleteAssignmentsByContextId().

UserGroupAssignmentDAO::getByUserId (   $userId,
  $contextId = null,
  $roleId = null 
)

Retrieve user group assignments for a user

Parameters
$userIdint
$contextIdint
$roleIdint
Returns
Iterator UserGroup

Definition at line 109 of file UserGroupAssignmentDAO.inc.php.

References DAO\retrieve().

UserGroupAssignmentDAO::insertObject (   $userGroupAssignment)

Insert an assignment

Parameters
$userId
$groupId

Definition at line 132 of file UserGroupAssignmentDAO.inc.php.

References DAO\update().

UserGroupAssignmentDAO::newDataObject ( )

Create a new UserGroupAssignment object (allows extensibility)

Definition at line 34 of file UserGroupAssignmentDAO.inc.php.

Referenced by _fromRow().

UserGroupAssignmentDAO::UserGroupAssignmentDAO ( )

Constructor.

Definition at line 26 of file UserGroupAssignmentDAO.inc.php.


The documentation for this class was generated from the following file: