Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
CategoryGridHandler Class Reference
Inheritance diagram for CategoryGridHandler:
GridHandler PKPHandler AuthorProofingSignoffFilesGridHandler CategoryCategoryGridHandler ChapterGridHandler LibraryFileGridHandler PluginGridHandler RepresentativesGridHandler SelectableSubmissionFileListCategoryGridHandler SystemInfoGridHandler UserGroupGridHandler

Public Member Functions

 CategoryGridHandler ($dataProvider=null)
 
 fetchCategory (&$args, $request)
 
 getCurrentCategoryId ()
 
 getDataElementInCategorySequence ($categoryId, &$gridDataElement)
 
 getEmptyCategoryRowText ()
 
 getJSHandler ()
 
 getRequestArgs ()
 
 hasGridDataElementsInCategory ($categoryDataElement, $request)
 
 isDataElementInCategorySelected ($categoryId, &$gridDataElement)
 
 setDataElementInCategorySequence ($categoryId, &$gridDataElement, $newSequence)
 
 setEmptyCategoryRowText ($translationKey)
 
 setUrls ($request)
 
- 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

 $_currentCategoryId = null
 
 $_emptyCategoryRowText = 'grid.noItems'
 
- 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

 doSpecificFetchGridActions ($args, $request, &$templateMgr)
 
getCategoryData (&$categoryDataElement, $filter=null)
 
 getCategoryRowIdParameterName ()
 
 getCategoryRowInstance ()
 
 getRequestedCategoryRow ($request, $args)
 
 getRowDataElement ($request, $rowId)
 
 getRowsSequence ($request)
 
 renderRowInternally ($request, $row)
 
 setFirstDataColumn ()
 
- 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 HTML grids with categories.

Definition at line 23 of file CategoryGridHandler.inc.php.

Member Function Documentation

CategoryGridHandler::CategoryGridHandler (   $dataProvider = null)

Constructor.

Definition at line 40 of file CategoryGridHandler.inc.php.

CategoryGridHandler::doSpecificFetchGridActions (   $args,
  $request,
$templateMgr 
)
protected
See Also
GridHandler::doSpecificFetchGridActions($args, $request)

Definition at line 212 of file CategoryGridHandler.inc.php.

CategoryGridHandler::fetchCategory ( $args,
  $request 
)

Render a category with all the rows inside of it.

Parameters
$argsarray
$requestRequest
Returns
string the serialized row JSON message or a flag that indicates that the row has not been found.

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

& CategoryGridHandler::getCategoryData ( $categoryDataElement,
  $filter = null 
)
protected

Fetch the contents of a category.

Parameters
$categoryDataElementmixed
Returns
array

Definition at line 332 of file CategoryGridHandler.inc.php.

CategoryGridHandler::getCategoryRowIdParameterName ( )
protected

Get the category row id parameter name.

Returns
string

Definition at line 322 of file CategoryGridHandler.inc.php.

Referenced by getRequestArgs().

CategoryGridHandler::getCategoryRowInstance ( )
protected

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

Returns
CategoryGridRow

Definition at line 313 of file CategoryGridHandler.inc.php.

CategoryGridHandler::getCurrentCategoryId ( )

Get the category id that this grid is currently rendering.

Parameters
int

Definition at line 86 of file CategoryGridHandler.inc.php.

CategoryGridHandler::getDataElementInCategorySequence (   $categoryId,
$gridDataElement 
)

Override to return the data element sequence value inside the passed category, if needed.

Parameters
$categoryIdint The data element category id.
$gridDataElementmixed The element to return the sequence.
Returns
int

Definition at line 98 of file CategoryGridHandler.inc.php.

CategoryGridHandler::getEmptyCategoryRowText ( )

Get the empty rows text for a category.

Returns
string

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

CategoryGridHandler::getJSHandler ( )
See Also
GridHandler::getJSHandler()

Definition at line 188 of file CategoryGridHandler.inc.php.

CategoryGridHandler::getRequestArgs ( )
CategoryGridHandler::getRequestedCategoryRow (   $request,
  $args 
)
protected

Tries to identify the data element in the grids data source that corresponds to the requested row id. Raises a fatal error if such an element cannot be found.

Parameters
$requestPKPRequest
$argsarray
Returns
GridRow the requested grid row, already configured with id and data or null if the row could not been found.

Definition at line 281 of file CategoryGridHandler.inc.php.

Referenced by isDataElementInCategorySelected().

CategoryGridHandler::getRowDataElement (   $request,
  $rowId 
)
protected
CategoryGridHandler::getRowsSequence (   $request)
protected
See Also
GridHandler::getRowsSequence()

Definition at line 204 of file CategoryGridHandler.inc.php.

CategoryGridHandler::hasGridDataElementsInCategory (   $categoryDataElement,
  $request 
)

Check whether the passed category has grid rows.

Parameters
$categoryDataElementmixed The category data element that will be checked.
$requestPKPRequest
Returns
boolean

Definition at line 75 of file CategoryGridHandler.inc.php.

References $_currentCategoryId.

CategoryGridHandler::isDataElementInCategorySelected (   $categoryId,
$gridDataElement 
)

Override to define whether the data element inside the passed category is selected or not.

Parameters
$categoryIdint
$gridDataElementmixed

Definition at line 120 of file CategoryGridHandler.inc.php.

References getRequestedCategoryRow().

CategoryGridHandler::renderRowInternally (   $request,
  $row 
)
protected
CategoryGridHandler::setDataElementInCategorySequence (   $categoryId,
$gridDataElement,
  $newSequence 
)

Override to set the data element new sequence inside the passed category, if needed.

Parameters
$categoryIdint The data element category id.
$gridDataElementmixed The element to set the new sequence.
$newSequenceint The new sequence value.

Definition at line 110 of file CategoryGridHandler.inc.php.

CategoryGridHandler::setEmptyCategoryRowText (   $translationKey)

Set the empty rows text for a category.

Parameters
string$translationKey

Definition at line 64 of file CategoryGridHandler.inc.php.

CategoryGridHandler::setFirstDataColumn ( )
protected
CategoryGridHandler::setUrls (   $request)
See Also
GridHandler::setUrls()

Definition at line 195 of file CategoryGridHandler.inc.php.

Member Data Documentation

string CategoryGridHandler::$_currentCategoryId = null

The category id that this grid is currently rendering.

Definition at line 35 of file CategoryGridHandler.inc.php.

Referenced by getRequestArgs(), and hasGridDataElementsInCategory().

string CategoryGridHandler::$_emptyCategoryRowText = 'grid.noItems'

empty category row locale key

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


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