Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ListbuilderHandler Class Reference
Inheritance diagram for ListbuilderHandler:
GridHandler PKPHandler CategoriesListbuilderHandler ChapterAuthorListbuilderHandler FilesListbuilderHandler MultipleListsListbuilderHandler NotifyUsersListbuilderHandler SetupListbuilderHandler UserUserGroupListbuilderHandler CopyeditingFilesListbuilderHandler ProofFilesListbuilderHandler BlockPluginsListbuilderHandler CategoriesListbuilderHandler FooterLinkListbuilderHandler SeriesEditorsListbuilderHandler

Public Member Functions

 deleteEntry ($request, $rowId)
 
 fetch ($args, $request)
 
 fetchOptions ($args, $request)
 
 getAddItemLinkAction ($actionRequest)
 
 getNewRowId ($request)
 
 getOptions ($request)
 
 getSaveFieldName ()
 
 getSaveType ()
 
 getSourceType ()
 
 getTemplate ()
 
 initialize ($request, $addItemLink=true)
 
 insertEntry ($request, $newRowId)
 
 ListbuilderHandler ()
 
 save ($args, $request)
 
 setSaveFieldName ($fieldName)
 
 setSaveType ($saveType)
 
 setSourceType ($sourceType)
 
 unpack ($request, $data, $deletionCallback=null, $insertionCallback=null, $updateCallback=null)
 
 updateEntry ($request, $rowId, $newRowId)
 
- 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

 $_saveFieldName = null
 
 $_saveType = LISTBUILDER_SAVE_TYPE_INTERNAL
 
 $_sourceType
 
- 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()
 

Protected Member Functions

 getRowInstance ()
 
- 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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 

Detailed Description

Class defining basic operations for handling Listbuilder UI elements.

Definition at line 45 of file ListbuilderHandler.inc.php.

Member Function Documentation

ListbuilderHandler::deleteEntry (   $request,
  $rowId 
)

Delete an entry.

Parameters
$requestRequest object
$rowIdmixed ID of row to modify
Returns
boolean

Definition at line 179 of file ListbuilderHandler.inc.php.

ListbuilderHandler::fetch (   $args,
  $request 
)

Fetch the listbuilder.

Parameters
$argsarray
$requestPKPRequest

Definition at line 229 of file ListbuilderHandler.inc.php.

ListbuilderHandler::fetchOptions (   $args,
  $request 
)

Load the set of options for a select list type listbuilder.

Parameters
$argsarray
$requestPKPRequest

Definition at line 325 of file ListbuilderHandler.inc.php.

ListbuilderHandler::getAddItemLinkAction (   $actionRequest)

Get the "add item" link action.

Parameters
$actionRequestActionRequest
Returns
LinkAction

Definition at line 153 of file ListbuilderHandler.inc.php.

Referenced by ListbuilderHandler().

ListbuilderHandler::getNewRowId (   $request)

Get the new row ID from the request. For multi-column listbuilders, this is an array representing the row. For single-column listbuilders, this is a single piece of data (i.e. a string or int)

Parameters
$requestPKPRequest
Returns
mixed

Definition at line 169 of file ListbuilderHandler.inc.php.

Referenced by NotifyUsersListbuilderHandler\getRowDataElement(), and FilesListbuilderHandler\getRowDataElement().

ListbuilderHandler::getOptions (   $request)

Fetch the options for a LISTBUILDER_SOURCE_TYPE_SELECT LB Should return a multidimensional array: array( array('column 1 option 1', 'column 2 option 1'), array('column 1 option 2', 'column 2 option 2' );

Parameters
requestRequest
Returns
array

Definition at line 217 of file ListbuilderHandler.inc.php.

ListbuilderHandler::getRowInstance ( )
protected
See Also
GridHandler::getRowInstance()
Returns
CitationGridRow

Definition at line 338 of file ListbuilderHandler.inc.php.

ListbuilderHandler::getSaveFieldName ( )

Set the save field name for LISTBUILDER_SAVE_TYPE_EXTERNAL

Returns
string

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

ListbuilderHandler::getSaveType ( )

Get the save type (using this handler or another external one)

Returns
int LISTBUILDER_SAVE_TYPE_...

Definition at line 127 of file ListbuilderHandler.inc.php.

ListbuilderHandler::getSourceType ( )

Get the type of source (Free text input, select from list, autocomplete)

Returns
int LISTBUILDER_SOURCE_TYPE_...

Definition at line 111 of file ListbuilderHandler.inc.php.

ListbuilderHandler::getTemplate ( )

Get the listbuilder template.

Returns
string

Definition at line 91 of file ListbuilderHandler.inc.php.

ListbuilderHandler::initialize (   $request,
  $addItemLink = true 
)
ListbuilderHandler::insertEntry (   $request,
  $newRowId 
)

Persist a new entry insert.

Parameters
$requestRequest object
$newRowIdmixed ID of row to modify

Definition at line 203 of file ListbuilderHandler.inc.php.

ListbuilderHandler::ListbuilderHandler ( )

Constructor.

Definition at line 67 of file ListbuilderHandler.inc.php.

References GridHandler\addAction(), and getAddItemLinkAction().

ListbuilderHandler::save (   $args,
  $request 
)

Save the listbuilder using the internal handler.

Parameters
$argsarray
$requestPKPRequest

Definition at line 305 of file ListbuilderHandler.inc.php.

ListbuilderHandler::setSaveFieldName (   $fieldName)

Set the save field name for LISTBUILDER_SAVE_TYPE_EXTERNAL

Parameters
$fieldNamestring

Definition at line 135 of file ListbuilderHandler.inc.php.

Referenced by BlockPluginsListbuilderHandler\initialize(), FilesListbuilderHandler\initialize(), and NotifyUsersListbuilderHandler\initialize().

ListbuilderHandler::setSaveType (   $saveType)

Set the save type (using this handler or another external one)

Parameters
$sourceTypeint LISTBUILDER_SAVE_TYPE_...

Definition at line 119 of file ListbuilderHandler.inc.php.

Referenced by FilesListbuilderHandler\initialize(), and NotifyUsersListbuilderHandler\initialize().

ListbuilderHandler::setSourceType (   $sourceType)

Set the type of source (Free text input, select from list, autocomplete)

Parameters
$sourceTypeint LISTBUILDER_SOURCE_TYPE_...

Definition at line 103 of file ListbuilderHandler.inc.php.

Referenced by FilesListbuilderHandler\initialize(), and NotifyUsersListbuilderHandler\initialize().

ListbuilderHandler::unpack (   $request,
  $data,
  $deletionCallback = null,
  $insertionCallback = null,
  $updateCallback = null 
)

Unpack data to save using an external handler.

Parameters
$dataString (the json encoded data from the listbuilder itself)
$deletionCallbackarray callback to be used for each deleted element
$insertionCallbackarray callback to be used for each updated element
$updateCallbackarray callback to be used for each updated element

Definition at line 240 of file ListbuilderHandler.inc.php.

Referenced by SubmissionSubmitStep3Form\execute(), ChapterForm\execute(), FormValidatorListbuilder\isValid(), UserForm\readInputData(), and SubmissionMetadataViewForm\readInputData().

ListbuilderHandler::updateEntry (   $request,
  $rowId,
  $newRowId 
)

Persist an update to an entry.

Parameters
$requestRequest object
$rowIdmixed ID of row to modify
$newRowIdmixed ID of the new entry
Returns
boolean

Definition at line 190 of file ListbuilderHandler.inc.php.

Member Data Documentation

string ListbuilderHandler::$_saveFieldName = null

Field for LISTBUILDER_SAVE_TYPE_EXTERNAL naming the field used to send the saved contents of the LB

Definition at line 62 of file ListbuilderHandler.inc.php.

int ListbuilderHandler::$_saveType = LISTBUILDER_SAVE_TYPE_INTERNAL

Constant indicating the save approach for the LB LISTBUILDER_SAVE_TYPE_...

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

int ListbuilderHandler::$_sourceType

Definition of the type of source LISTBUILDER_SOURCE_TYPE_...

Definition at line 50 of file ListbuilderHandler.inc.php.


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