Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
UserGridHandler Class Reference
Inheritance diagram for UserGridHandler:
GridHandler PKPHandler

Public Member Functions

 addUser ($args, $request)
 
 authorize ($request, &$args, $roleAssignments)
 
 disableUser ($args, $request)
 
 editDisableUser ($args, $request)
 
 editEmail ($args, $request)
 
 editUser ($args, $request)
 
 getFilterForm ()
 
 getFilterSelectionData ($request)
 
 getRequestArgs ()
 
 getRowInstance ()
 
 initFeatures ($request, $args)
 
 initialize ($request)
 
 loadData ($request, $filter)
 
 mergeUsers ($args, $request)
 
 removeUser ($args, $request)
 
 renderFilter ($request)
 
 sendEmail ($args, $request)
 
 suggestUsername ($args, $request)
 
 updateUser ($args, $request)
 
 updateUserRoles ($args, $request)
 
 UserGridHandler ()
 
- Public Member Functions inherited from GridHandler
 addAction ($action, $position=GRID_ACTION_POSITION_ABOVE)
 
 addColumn ($column)
 
 authorize ($request, &$args, $roleAssignments, $enforceRestrictedSite=true)
 
 fetchCell (&$args, $request)
 
 fetchGrid ($args, $request)
 
 fetchRow (&$args, $request)
 
 getActions ($position=GRID_ACTION_POSITION_ABOVE)
 
 getColumn ($columnId)
 
getColumns ()
 
getColumnsByFlag ($flag)
 
 getColumnsCount ($flag)
 
 getDataElementSequence (&$gridDataElement)
 
 getDataProvider ()
 
 getEmptyRowText ()
 
 getFeatures ()
 
 getFootNote ()
 
getGridDataElements ($request)
 
 getGridRangeInfo ($request, $rangeName, $contextData=null)
 
 getInstructions ()
 
 getIsSubcomponent ()
 
 getItemIterator ()
 
 getJSHandler ()
 
 getPublishChangeEvents ()
 
 getRequestArg ($key)
 
 getRequestArgs ()
 
 getRequestedRow ($request, $args)
 
 getSelectName ()
 
 getTemplate ()
 
 getTitle ()
 
 getUrls ()
 
 GridHandler ($dataProvider=null)
 
 hasColumn ($columnId)
 
 hasGridDataElements ($request)
 
 initialize ($request, $args=null)
 
 isDataElementSelected ($gridDataElement)
 
 renderRow ($request, $row)
 
 saveSequence ($args, $request)
 
 setDataElementSequence ($request, $rowId, &$gridDataElement, $newSequence)
 
 setEmptyRowText ($emptyRowText)
 
 setFootNote ($footNote)
 
 setGridDataElements ($data)
 
 setInstructions ($instructions)
 
 setTemplate ($template)
 
 setTitle ($title)
 
 setUrls ($request, $extraUrls=array())
 
- Public Member Functions inherited from PKPHandler
 addCheck (&$handlerValidator)
 
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 authorize ($request, &$args, $roleAssignments, $enforceRestrictedSite=true)
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getLoginExemptions ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getWorkingContexts ($request)
 
 index ($args, $request)
 
 initialize ($request, $args=null)
 
 PKPHandler ()
 
 setDispatcher ($dispatcher)
 
 setId ($id)
 
 setupTemplate ($request)
 
 validate ($requiredContexts=null, $request=null)
 

Public Attributes

 $_oldUserId
 
- Public Attributes inherited from GridHandler
 $_actions = array(GRID_ACTION_POSITION_DEFAULT => array())
 
 $_columns = array()
 
 $_data
 
 $_emptyRowText = 'grid.noItems'
 
 $_features
 
 $_footNote = ''
 
 $_instructions = ''
 
 $_itemIterator
 
 $_template
 
 $_title = ''
 
 $_urls
 
- Public Attributes inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_id
 
 $_roleAssignments = array()
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 
- Protected Member Functions inherited from GridHandler
 callFeaturesHook ($hookName, $args)
 
 doSpecificFetchGridActions ($args, $request, $templateMgr)
 
getDataElementFromRequest ($request, &$elementId)
 
 getFilterForm ()
 
 getFilterSelectionData ($request)
 
 getRowDataElement ($request, $rowId)
 
 getRowInstance ()
 
 getRowsSequence ($request)
 
 initFeatures ($request, &$args)
 
 loadData ($request, $filter)
 
 noAutocompleteResults ()
 
 renderFilter ($request, $filterData=array())
 
 renderGridBodyPartsInternally ($request)
 
 renderRowInternally ($request, $row)
 
 renderRowsInternally ($request, &$elements)
 
 setFirstDataColumn ()
 

Detailed Description

Handle user grid requests.

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

Member Function Documentation

UserGridHandler::addUser (   $args,
  $request 
)

Add a new user.

Parameters
$argsarray
$requestPKPRequest

Definition at line 272 of file UserGridHandler.inc.php.

References editUser().

UserGridHandler::authorize (   $request,
$args,
  $roleAssignments 
)

Authorize this request.

Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.

NB: This method will be called once for every request only.

Parameters
$requestRequest
$argsarray request arguments
$roleAssignmentsarray the operation role assignment, see getRoleAssignment() for more details.
$enforceRestrictedSiteboolean True iff site restrictions are to be enforced
Returns
boolean

Definition at line 48 of file UserGridHandler.inc.php.

References PKPHandler\addPolicy().

UserGridHandler::disableUser (   $args,
  $request 
)

Enable/Disable an existing user

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 418 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), DAO\getDataChangedEvent(), and JSONMessage\getString().

UserGridHandler::editDisableUser (   $args,
  $request 
)

Edit enable/disable user form

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 387 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), and JSONMessage\getString().

UserGridHandler::editEmail (   $args,
  $request 
)

Displays a modal to edit an email message to the user.

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 488 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), and JSONMessage\getString().

UserGridHandler::editUser (   $args,
  $request 
)

Edit an existing user.

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 283 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), and JSONMessage\getString().

Referenced by addUser().

UserGridHandler::getFilterForm ( )

Returns a Form object or the path name of a filter template.

Returns
Form|string
string Filter template.

Definition at line 244 of file UserGridHandler.inc.php.

UserGridHandler::getFilterSelectionData (   $request)

Method that extracts the user's filter selection from the request either by instantiating the filter's Form object or by reading the request directly (if using a simple filter template only).

Parameters
$requestPKPRequest
Returns
array
array Filter selection data.

Definition at line 223 of file UserGridHandler.inc.php.

UserGridHandler::getRequestArgs ( )
See Also
GridHandler::getRequestArgs()

Definition at line 565 of file UserGridHandler.inc.php.

References $_oldUserId.

UserGridHandler::getRowInstance ( )

Get a new instance of a grid row. May be overridden by subclasses if they want to provide a custom row definition.

Returns
GridRow
UserGridRow

Definition at line 149 of file UserGridHandler.inc.php.

UserGridHandler::initFeatures (   $request,
  $args 
)

Override to init grid features. This method is called by GridHandler::initialize() method that use the returned array with the initialized features to add them to grid.

Parameters
$requestRequest
$argsarray
Returns
array Array with initialized grid features objects.

Definition at line 156 of file UserGridHandler.inc.php.

UserGridHandler::initialize (   $request)

Subclasses can override this method to configure the handler.

NB: This method will be called after validation and authorization.

Parameters
$requestPKPRequest
$argsarray

Definition at line 57 of file UserGridHandler.inc.php.

References GridHandler\addAction(), GridHandler\addColumn(), AppLocale\requireComponents(), and GridHandler\setTitle().

UserGridHandler::loadData (   $request,
  $filter 
)

Implement this method to load data into the grid.

Parameters
$requestRequest
$filterarray An associative array with filter data as returned by getFilterSelectionData(). If no filter has been selected by the user then the array will be empty.
Returns
grid data
Parameters
$requestPKPRequest
Returns
array Grid data.

Definition at line 166 of file UserGridHandler.inc.php.

References DAORegistry\getDAO(), GridHandler\getGridRangeInfo(), and PKPHandler\getId().

UserGridHandler::mergeUsers (   $args,
  $request 
)

Allow the Site Administrator to merge user accounts, including attributed submissions etc.

Parameters
$argsarray
$requestPKPRequest

Definition at line 544 of file UserGridHandler.inc.php.

References DAO\getDataChangedEvent().

UserGridHandler::removeUser (   $args,
  $request 
)

Remove all user group assignments for a context for a given user.

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 457 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), DAORegistry\getDAO(), and DAO\getDataChangedEvent().

UserGridHandler::renderFilter (   $request)

Render the filter (a template or a Form).

Parameters
$requestPKPRequest
$filterDataArray Data to be used by the filter template.
Returns
string

Definition at line 187 of file UserGridHandler.inc.php.

References DAORegistry\getDAO().

UserGridHandler::sendEmail (   $args,
  $request 
)

Send the user email and close the modal.

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 514 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), and JSONMessage\getString().

UserGridHandler::suggestUsername (   $args,
  $request 
)

Get a suggested username, making sure it's not already used.

Parameters
$argsarray
$requestPKPRequest

Definition at line 257 of file UserGridHandler.inc.php.

References PKPValidation\suggestUsername().

UserGridHandler::updateUser (   $args,
  $request 
)

Update an existing user.

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 308 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), DAO\getDataChangedEvent(), and Form\initData().

UserGridHandler::updateUserRoles (   $args,
  $request 
)

Update a newly created user's roles

Parameters
$argsarray
$requestPKPRequest
Returns
string Serialized JSON object

Definition at line 354 of file UserGridHandler.inc.php.

References PKPValidation\canAdminister(), DAO\getDataChangedEvent(), and UserForm\readInputData().

UserGridHandler::UserGridHandler ( )

Constructor

Definition at line 29 of file UserGridHandler.inc.php.

References PKPHandler\addRoleAssignment().

Member Data Documentation

UserGridHandler::$_oldUserId

integer user id for the user to remove

Definition at line 24 of file UserGridHandler.inc.php.

Referenced by getRequestArgs().


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