Open Journal Systems  3.3.0
GridHandler Class Reference
Inheritance diagram for GridHandler:
PKPHandler AnnouncementTypeGridHandler ArticleGalleyGridHandler AuthorGridHandler CategoryGridHandler ContextGridHandler CustomBlockGridHandler ExportableUsersGridHandler ExportPublishedSubmissionsListGridHandler IssueGalleyGridHandler IssueGridHandler LanguageGridHandler ListbuilderHandler NavigationMenuItemsGridHandler NavigationMenusGridHandler NotificationsGridHandler PaymentsGridHandler PKPReviewerGridHandler PLNStatusGridHandler PluginGalleryGridHandler PubIdExportIssuesListGridHandler PubIdExportRepresentationsListGridHandler QueriesGridHandler QueryNotesGridHandler ReviewFormElementsGridHandler ReviewFormGridHandler SetupGridHandler StaticPageGridHandler SubmissionEventLogGridHandler SubmissionFilesGridHandler SubscriberSelectGridHandler SubscriptionsGridHandler SubscriptionTypesGridHandler SwordDepositPointsGridHandler UserGridHandler UserGroupGridHandler UserSelectGridHandler

Public Member Functions

 __construct ($dataProvider=null)
 
 addAction ($action, $position=GRID_ACTION_POSITION_ABOVE)
 
 addColumn ($column)
 
 authorize ($request, &$args, $roleAssignments)
 
 fetchCell (&$args, $request)
 
 fetchGrid ($args, $request)
 
 fetchRow ($args, $request)
 
 fetchRows ($args, $request)
 
 getActions ($position=GRID_ACTION_POSITION_ABOVE)
 
 getColumn ($columnId)
 
getColumns ()
 
getColumnsByFlag ($flag)
 
 getColumnsCount ($flag=null)
 
 getDataElementSequence ($gridDataElement)
 
 getDataProvider ()
 
 getEmptyRowText ()
 
 getFeatures ()
 
 getFootNote ()
 
getGridDataElements ($request)
 
 getGridRangeInfo ($request, $rangeName, $contextData=null)
 
 getIsSubcomponent ()
 
 getItemIterator ()
 
 getJSHandler ()
 
 getPublishChangeEvents ()
 
 getRequestArg ($key)
 
 getRequestArgs ()
 
 getRequestedRow ($request, $args)
 
 getSelectName ()
 
 getTemplate ()
 
 getTitle ()
 
 getUrls ()
 
 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)
 
 setTemplate ($template)
 
 setTitle ($title)
 
 setUrls ($request, $extraUrls=array())
 
- Public Member Functions inherited from PKPHandler
 __construct ()
 
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 getApiToken ()
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getSiteRedirectContext ($request)
 
 getTargetContext ($request, &$contextsCount=null)
 
 index ($args, $request)
 
 initialize ($request)
 
 markRoleAssignmentsChecked ()
 
 requireSSL ()
 
 setApiToken ($apiToken)
 
 setDispatcher ($dispatcher)
 
 setEnforceRestrictedSite ($enforceRestrictedSite)
 
 setId ($id)
 
 setupTemplate ($request)
 
 validate ($requiredContexts=null, $request=null)
 

Data Fields

 $_actions = array(GRID_ACTION_POSITION_DEFAULT => array())
 
 $_columns = array()
 
 $_constants = []
 
 $_data
 
 $_dataProvider
 
 $_emptyRowText = 'grid.noItems'
 
 $_features
 
 $_footNote = ''
 
 $_itemIterator
 
 $_template
 
 $_title = ''
 
 $_urls
 
- Data Fields inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_enforceRestrictedSite = true
 
 $_id
 
 $_isBackendPage = false
 
 $_roleAssignments = array()
 
 $_roleAssignmentsChecked = false
 

Protected Member Functions

 callFeaturesHook ($hookName, $args)
 
 doSpecificFetchGridActions ($args, $request, $templateMgr)
 
getDataElementFromRequest ($request, &$elementId)
 
 getFilterForm ()
 
 getFilterSelectionData ($request)
 
 getRowDataElement ($request, &$rowId)
 
 getRowInstance ()
 
 getRowsSequence ($request)
 
 initFeatures ($request, $args)
 
 isFilterFormCollapsible ()
 
 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())
 
- Protected Attributes inherited from PKPHandler
 $_apiToken = null
 

Detailed Description

This class defines basic operations for handling HTML grids. Grids are used to implement a standardized listing of elements, as would commonly be laid out in an HTML table, permitting rows, columns, row actions (such as "delete" and "edit" actions, which operate on a single row), and grid actions (such as "new element", which operates on the grid as a whole), and other functionality to be implemented consistently.

An implemented grid consists of several classes, with a subclass of GridHandler as the centerpiece. Each row is described by an instance of a GridRow, which is generally extended for the row in question; each column is described by an instance of GridColumn (for which several generic columns are implemented). Often grids will make use of a specific subclass of DataProvider in order to prepare data for display in the grid.

Actions (be they row or grid actions) are implemented by LinkAction instances.

There are several subclasses of GridHandler that provide generalized grids of particular forms, such as CategoryGridHandler and ListbuilderHandler.

The JavaScript front-end is described at https://pkp.sfu.ca/wiki/index.php?title=JavaScript_widget_controllers#Grids.

For a concrete example of a grid handler (and related classes), see AnnouncementTypeGridHandler.

Definition at line 58 of file GridHandler.inc.php.

Constructor & Destructor Documentation

◆ __construct()

GridHandler::__construct (   $dataProvider = null)

Constructor.

Parameters
$dataProviderGridDataProvider An optional data provider for the grid. If no data provider is given then the grid assumes that child classes will override default method implementations.

Reimplemented in PluginGridHandler, CategoryGridHandler, and LibraryFileGridHandler.

Definition at line 144 of file GridHandler.inc.php.

Member Function Documentation

◆ addAction()

GridHandler::addAction (   $action,
  $position = GRID_ACTION_POSITION_ABOVE 
)

Add an action.

Parameters
$actionMixed a single action.
$positionstring The position of the action.

Definition at line 266 of file GridHandler.inc.php.

Referenced by FutureIssueGridHandler\initialize(), NotificationsGridHandler\initialize(), SubmissionChecklistGridHandler\initialize(), SectionGridHandler\initialize(), GenreGridHandler\initialize(), FileListGridHandler\initialize(), PluginGridHandler\initialize(), SubmissionDocumentsFilesGridHandler\initialize(), ReviewFormGridHandler\initialize(), ExportableUsersGridHandler\initialize(), SubscriptionsGridHandler\initialize(), SubscriptionTypesGridHandler\initialize(), SwordDepositPointsGridHandler\initialize(), UserGridHandler\initialize(), ContextGridHandler\initialize(), ListbuilderHandler\initialize(), CustomBlockGridHandler\initialize(), AdminLanguageGridHandler\initialize(), AnnouncementTypeGridHandler\initialize(), StaticPageGridHandler\initialize(), ReviewFormElementsGridHandler\initialize(), CategoryCategoryGridHandler\initialize(), NavigationMenuItemsGridHandler\initialize(), NavigationMenusGridHandler\initialize(), LibraryFileGridHandler\initialize(), IssueGalleyGridHandler\initialize(), StageParticipantGridHandler\initialize(), UserGroupGridHandler\initialize(), AuthorGridHandler\initialize(), ArticleGalleyGridHandler\initialize(), SubmissionFilesGridHandler\initialize(), QueriesGridHandler\initialize(), SelectableSubmissionFileListCategoryGridHandler\initialize(), PKPReviewerGridHandler\initialize(), and initialize().

◆ addColumn()

GridHandler::addColumn (   $column)

Add a column.

Parameters
$columnmixed A single GridColumn instance.

Definition at line 335 of file GridHandler.inc.php.

Referenced by CategoryGridHandler\__construct(), BackIssueGridHandler\_addCenterColumns(), PubIdExportSubmissionsListGridHandler\addAdditionalColumns(), LanguageGridHandler\addManagementColumns(), LanguageGridHandler\addNameColumn(), LanguageGridHandler\addPrimaryColumn(), InstitutionalSubscriptionsGridHandler\initialize(), IndividualSubscriptionsGridHandler\initialize(), ReviewFormElementResponseItemListbuilderHandler\initialize(), NotificationsGridHandler\initialize(), SubmissionChecklistGridHandler\initialize(), SectionGridHandler\initialize(), GenreGridHandler\initialize(), FileListGridHandler\initialize(), PluginGridHandler\initialize(), ReviewFormGridHandler\initialize(), PluginGalleryGridHandler\initialize(), PaymentsGridHandler\initialize(), ExportableUsersGridHandler\initialize(), SubscriberSelectGridHandler\initialize(), SubscriptionTypesGridHandler\initialize(), PLNStatusGridHandler\initialize(), SwordDepositPointsGridHandler\initialize(), AuthorReviewerGridHandler\initialize(), ContextGridHandler\initialize(), TocGridHandler\initialize(), UserGridHandler\initialize(), UserSelectGridHandler\initialize(), ExportPublishedSubmissionsListGridHandler\initialize(), PubIdExportRepresentationsListGridHandler\initialize(), CustomBlockGridHandler\initialize(), PubIdExportIssuesListGridHandler\initialize(), AdminLanguageGridHandler\initialize(), AnnouncementTypeGridHandler\initialize(), StaticPageGridHandler\initialize(), ReviewFormElementsGridHandler\initialize(), CategoryCategoryGridHandler\initialize(), IssueGridHandler\initialize(), NavigationMenusGridHandler\initialize(), NavigationMenuItemsGridHandler\initialize(), LibraryFileGridHandler\initialize(), QueryNotesGridHandler\initialize(), IssueGalleyGridHandler\initialize(), StageParticipantGridHandler\initialize(), UserGroupGridHandler\initialize(), AuthorGridHandler\initialize(), ArticleGalleyGridHandler\initialize(), SubmissionEventLogGridHandler\initialize(), SubmissionFilesGridHandler\initialize(), QueriesGridHandler\initialize(), SelectableSubmissionFileListCategoryGridHandler\initialize(), and PKPReviewerGridHandler\initialize().

◆ authorize()

GridHandler::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.
Returns
boolean

Reimplemented from PKPHandler.

Reimplemented in SelectableSubmissionFileListCategoryGridHandler, ReviewFormGridHandler, QueriesGridHandler, AuthorReviewerGridHandler, SubmissionFilesGridHandler, PluginGalleryGridHandler, AuthorGridHandler, PLNStatusGridHandler, ArticleGalleyGridHandler, SubmissionEventLogGridHandler, PKPReviewerGridHandler, QueryNotesGridHandler, StageParticipantGridHandler, SettingsPluginGridHandler, UserGroupGridHandler, CategoryCategoryGridHandler, SetupListbuilderHandler, StaticPageGridHandler, IssueGridHandler, SubmissionFileEventLogGridHandler, AdminPluginGridHandler, UserGridHandler, AdminLanguageGridHandler, ManageProofFilesGridHandler, NavigationMenuItemsGridHandler, ReviewFormElementsGridHandler, CustomBlockGridHandler, LimitReviewFilesGridHandler, SwordDepositPointsGridHandler, PubIdExportIssuesListGridHandler, PubIdExportRepresentationsListGridHandler, SubscriptionTypesGridHandler, SubscriberSelectGridHandler, NavigationMenusGridHandler, UserSelectGridHandler, ExportPublishedSubmissionsListGridHandler, SubscriptionsGridHandler, TocGridHandler, AnnouncementTypeGridHandler, ExportableUsersGridHandler, IssueGalleyGridHandler, PaymentsGridHandler, ContextGridHandler, and ManageLanguageGridHandler.

Definition at line 604 of file GridHandler.inc.php.

References PKPHandler\addPolicy(), PKPHandler\getAuthorizedContext(), and getDataProvider().

◆ callFeaturesHook()

GridHandler::callFeaturesHook (   $hookName,
  $args 
)
protected

Call the passed hook in all attached features.

Parameters
$hookNamestring
$argsarray Arguments provided by this handler.

Definition at line 996 of file GridHandler.inc.php.

References getFeatures().

Referenced by fetchGrid(), fetchRow(), fetchRows(), getGridDataElements(), getGridRangeInfo(), getRequestArgs(), initialize(), loadData(), saveSequence(), and setGridDataElements().

◆ doSpecificFetchGridActions()

GridHandler::doSpecificFetchGridActions (   $args,
  $request,
  $templateMgr 
)
protected

Override this method if your subclass needs to perform different actions than the ones implemented here. This method is called by GridHandler::fetchGrid()

Parameters
$argsarray
$requestPKPRequest
$templateMgrPKPTemplateManager

Reimplemented in CategoryGridHandler.

Definition at line 957 of file GridHandler.inc.php.

References renderGridBodyPartsInternally().

Referenced by fetchGrid().

◆ fetchCell()

GridHandler::fetchCell ( $args,
  $request 
)

Render a cell and send it to the client

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage JSON object

Definition at line 765 of file GridHandler.inc.php.

References fatalError(), getColumn(), getRequestedRow(), hasColumn(), and setFirstDataColumn().

◆ fetchGrid()

GridHandler::fetchGrid (   $args,
  $request 
)

Render the entire grid controller and send it to the client.

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage JSON object

Definition at line 661 of file GridHandler.inc.php.

References callFeaturesHook(), doSpecificFetchGridActions(), getColumns(), getFeatures(), PKPTemplateManager\getManager(), getRequestArgs(), renderFilter(), setFirstDataColumn(), and setUrls().

Referenced by ReviewFormElementResponseItemListbuilderHandler\fetch(), and ListbuilderHandler\fetch().

◆ fetchRow()

GridHandler::fetchRow (   $args,
  $request 
)

Render a row and send it to the client. If the row no longer exists then inform the client.

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage JSON object.

Reimplemented in ArticleGalleyGridHandler.

Definition at line 734 of file GridHandler.inc.php.

References callFeaturesHook(), getRequestedRow(), getRowsSequence(), and renderRow().

◆ fetchRows()

GridHandler::fetchRows (   $args,
  $request 
)

Fetch all grid rows from loaded data.

Parameters
$argsArray
$requestPKPRequest
Returns
JSONMessage JSON object.

Definition at line 704 of file GridHandler.inc.php.

References callFeaturesHook(), getGridDataElements(), renderRowsInternally(), and setFirstDataColumn().

◆ getActions()

GridHandler::getActions (   $position = GRID_ACTION_POSITION_ABOVE)

Get all actions for a given position within the grid.

Parameters
$positionstring The position of the actions.
Returns
array The LinkActions for the given position.

Definition at line 256 of file GridHandler.inc.php.

◆ getColumn()

GridHandler::getColumn (   $columnId)

Retrieve a single column by id.

Parameters
$columnId
Returns
GridColumn

Definition at line 284 of file GridHandler.inc.php.

Referenced by fetchCell().

◆ getColumns()

& GridHandler::getColumns ( )

Get all columns.

Returns
array An array of GridColumn instances.

Definition at line 275 of file GridHandler.inc.php.

References $_columns.

Referenced by fetchGrid(), getColumnsByFlag(), getColumnsCount(), renderRowInternally(), CategoryGridHandler\setFirstDataColumn(), and setFirstDataColumn().

◆ getColumnsByFlag()

& GridHandler::getColumnsByFlag (   $flag)

Get columns by flag.

Parameters
$flagstring
Returns
array

Definition at line 294 of file GridHandler.inc.php.

References getColumns().

◆ getColumnsCount()

GridHandler::getColumnsCount (   $flag = null)

Get columns number. If a flag is passed, the columns using it will not be counted.

Parameters
$flagoptional string
Returns
int

Definition at line 311 of file GridHandler.inc.php.

References getColumns().

◆ getDataElementFromRequest()

& GridHandler::getDataElementFromRequest (   $request,
$elementId 
)
protected

Create a data element from a request. This is used to format new rows prior to their insertion or existing rows that have been edited but not saved.

Parameters
$requestPKPRequest
$elementIdint Reference to be filled with element ID (if one is to be used)
Returns
object

Definition at line 840 of file GridHandler.inc.php.

References fatalError().

◆ getDataElementSequence()

GridHandler::getDataElementSequence (   $gridDataElement)

◆ getDataProvider()

◆ getEmptyRowText()

GridHandler::getEmptyRowText ( )

Get the no items locale key

Returns
string locale key

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

References $_emptyRowText.

◆ getFeatures()

GridHandler::getFeatures ( )

Get all grid attached features.

Returns
array

Definition at line 455 of file GridHandler.inc.php.

References $_features.

Referenced by callFeaturesHook(), and fetchGrid().

◆ getFilterForm()

◆ getFilterSelectionData()

GridHandler::getFilterSelectionData (   $request)
protected

◆ getFootNote()

GridHandler::getFootNote ( )

Get the grid foot note.

Returns
string locale key

Definition at line 239 of file GridHandler.inc.php.

References $_footNote.

◆ getGridDataElements()

◆ getGridRangeInfo()

GridHandler::getGridRangeInfo (   $request,
  $rangeName,
  $contextData = null 
)

◆ getIsSubcomponent()

GridHandler::getIsSubcomponent ( )

Override this method to return true if you want to use the grid within another component (e.g. to remove the title or change the layout accordingly).

Returns
boolean

Reimplemented in StageParticipantGridHandler.

Definition at line 447 of file GridHandler.inc.php.

◆ getItemIterator()

GridHandler::getItemIterator ( )

Get the item iterator that represents this grid data. Should only be used for retrieving paging data. See #6498.

Returns
ItemIterator

Definition at line 465 of file GridHandler.inc.php.

References $_itemIterator.

◆ getJSHandler()

GridHandler::getJSHandler ( )

◆ getPublishChangeEvents()

GridHandler::getPublishChangeEvents ( )

Get "publish data changed" event list.

Returns
array

Reimplemented in ContextGridHandler, and NotificationsGridHandler.

Definition at line 473 of file GridHandler.inc.php.

◆ getRequestArg()

GridHandler::getRequestArg (   $key)

Get a single grid request parameter.

See also
getRequestArgs()
Parameters
$keystring The name of the parameter to retrieve.
Returns
mixed

Definition at line 197 of file GridHandler.inc.php.

References getRequestArgs().

Referenced by CategoryGridHandler\renderRowInternally().

◆ getRequestArgs()

GridHandler::getRequestArgs ( )

Get the grid request parameters. These are the parameters that uniquely identify the data within a grid.

NB: You should make sure to authorize and/or validate parameters before you publish them through this interface. Callers will assume that data accessed through this method will not have to be sanitized.

The default implementation tries to retrieve request parameters from a data provider if there is one.

Returns
array

Reimplemented in UserGridHandler, PKPReviewerGridHandler, QueriesGridHandler, ExportableUsersGridHandler, CategoryGridHandler, AuthorGridHandler, StageParticipantGridHandler, SubscriberSelectGridHandler, ArticleGalleyGridHandler, SubmissionEventLogGridHandler, UserSelectGridHandler, PubIdExportRepresentationsListGridHandler, ReviewFormElementsGridHandler, ExportPublishedSubmissionsListGridHandler, QueryNotesGridHandler, PubIdExportIssuesListGridHandler, TocGridHandler, ManageReviewFilesGridHandler, IssueGalleyGridHandler, SubmissionFileEventLogGridHandler, ManageProofFilesGridHandler, and DependentFilesGridHandler.

Definition at line 178 of file GridHandler.inc.php.

References callFeaturesHook(), and getDataProvider().

Referenced by fetchGrid(), and getRequestArg().

◆ getRequestedRow()

GridHandler::getRequestedRow (   $request,
  $args 
)

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 539 of file GridHandler.inc.php.

References getRowDataElement().

Referenced by fetchCell(), ArticleGalleyGridHandler\fetchRow(), and fetchRow().

◆ getRowDataElement()

GridHandler::getRowDataElement (   $request,
$rowId 
)
protected

Retrieve a single data element from the grid's data source corresponding to the given row id. If none is found then return null.

Parameters
$requestPKPRequest
$rowIdstring The row ID; reference permits modification.
Returns
mixed

Reimplemented in CategoryGridHandler, and ReviewFormElementResponseItemListbuilderHandler.

Definition at line 852 of file GridHandler.inc.php.

References getGridDataElements().

Referenced by getRequestedRow().

◆ getRowInstance()

◆ getRowsSequence()

GridHandler::getRowsSequence (   $request)
protected

Return the sequence map of the current loaded grid items. This is not the sequence value of the data represented by the row, it's just the mapping of the rows sequence, in the order that they are loaded. To handle grid items ordering, see OrderItemsFeature class.

Parameters
$requestPKPRequest
Returns
array

Reimplemented in CategoryGridHandler.

Definition at line 815 of file GridHandler.inc.php.

References getGridDataElements().

Referenced by fetchRow().

◆ getSelectName()

◆ getTemplate()

GridHandler::getTemplate ( )

Get the grid template.

Returns
string

Reimplemented in ListbuilderHandler.

Definition at line 399 of file GridHandler.inc.php.

References $_template, and setTemplate().

◆ getTitle()

GridHandler::getTitle ( )

Get the grid title.

Returns
string locale key

Definition at line 207 of file GridHandler.inc.php.

References $_title.

◆ getUrls()

GridHandler::getUrls ( )

Return all grid urls that will be used in JS handler.

Returns
array

Definition at line 420 of file GridHandler.inc.php.

References $_urls.

◆ hasColumn()

GridHandler::hasColumn (   $columnId)

Checks whether a column exists.

Parameters
$columnId
Returns
boolean

Definition at line 327 of file GridHandler.inc.php.

Referenced by fetchCell().

◆ hasGridDataElements()

GridHandler::hasGridDataElements (   $request)

Check whether the grid has rows.

Returns
boolean

Definition at line 369 of file GridHandler.inc.php.

References getGridDataElements().

◆ initFeatures()

◆ initialize()

GridHandler::initialize (   $request,
  $args = null 
)
See also
PKPHandler::initialize()
Parameters
$requestPKPRequest
$argsarray optional

Reimplemented in CategoryGridHandler, PKPReviewerGridHandler, SelectableSubmissionFileListCategoryGridHandler, QueriesGridHandler, SubmissionFilesGridHandler, SubmissionEventLogGridHandler, ArticleGalleyGridHandler, AuthorGridHandler, UserGroupGridHandler, StageParticipantGridHandler, IssueGalleyGridHandler, QueryNotesGridHandler, LibraryFileGridHandler, NavigationMenuItemsGridHandler, NavigationMenusGridHandler, ManageLanguageGridHandler, IssueGridHandler, CategoryCategoryGridHandler, ReviewFormElementsGridHandler, SetupListbuilderHandler, AnnouncementTypeGridHandler, StaticPageGridHandler, AdminLanguageGridHandler, CopyeditFilesGridHandler, SubmissionFileEventLogGridHandler, PubIdExportIssuesListGridHandler, PubIdExportRepresentationsListGridHandler, CustomBlockGridHandler, ExportPublishedSubmissionsListGridHandler, ListbuilderHandler, TocGridHandler, ContextGridHandler, UserGridHandler, UserSelectGridHandler, AuthorReviewerGridHandler, SwordDepositPointsGridHandler, SubscriptionTypesGridHandler, SubscriberSelectGridHandler, PLNStatusGridHandler, SubscriptionsGridHandler, ExportableUsersGridHandler, PaymentsGridHandler, ProductionReadyFilesGridHandler, PluginGalleryGridHandler, ReviewFormGridHandler, LibraryFileAdminGridHandler, ReviewerReviewAttachmentsGridHandler, SubmissionDocumentsFilesGridHandler, PluginGridHandler, FileListGridHandler, GenreGridHandler, LanguageGridHandler, SectionGridHandler, BackIssueGridHandler, SubmissionChecklistGridHandler, NotificationsGridHandler, SetupGridHandler, ReviewFormElementResponseItemListbuilderHandler, FutureIssueGridHandler, IndividualSubscriptionsGridHandler, InstitutionalSubscriptionsGridHandler, and TaskNotificationsGridHandler.

Definition at line 625 of file GridHandler.inc.php.

References addAction(), callFeaturesHook(), getFilterForm(), initFeatures(), isFilterFormCollapsible(), and AppLocale\requireComponents().

◆ isDataElementSelected()

◆ isFilterFormCollapsible()

GridHandler::isFilterFormCollapsible ( )
protected

Determine whether a filter form should be collapsible.

Returns
boolean

Reimplemented in SubscriberSelectGridHandler, UserSelectGridHandler, and SelectableSubmissionFileListCategoryGridHandler.

Definition at line 895 of file GridHandler.inc.php.

Referenced by initialize().

◆ loadData()

GridHandler::loadData (   $request,
  $filter 
)
protected

Implement this method to load data into the grid.

Parameters
$requestPKPRequest
$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

Reimplemented in QueriesGridHandler, AuthorGridHandler, ArticleGalleyGridHandler, SubmissionEventLogGridHandler, ReviewFormGridHandler, QueryNotesGridHandler, ReviewFormElementsGridHandler, ContextGridHandler, SubmissionFileEventLogGridHandler, ReviewFormElementResponseItemListbuilderHandler, PKPReviewerGridHandler, IssueGalleyGridHandler, PubIdExportRepresentationsListGridHandler, StageParticipantGridHandler, ExportPublishedSubmissionsListGridHandler, PluginGridHandler, PubIdExportIssuesListGridHandler, ExportableUsersGridHandler, UserGridHandler, UserGroupGridHandler, SubscriptionTypesGridHandler, TocGridHandler, AuthorReviewerGridHandler, LibraryFileGridHandler, IndividualSubscriptionsGridHandler, InstitutionalSubscriptionsGridHandler, NavigationMenusGridHandler, AdminLanguageGridHandler, UserSelectGridHandler, PluginGalleryGridHandler, NavigationMenuItemsGridHandler, PaymentsGridHandler, SubscriberSelectGridHandler, AnnouncementTypeGridHandler, CategoryCategoryGridHandler, GenreGridHandler, PLNStatusGridHandler, SelectableSubmissionFileListCategoryGridHandler, SubmissionChecklistGridHandler, BackIssueGridHandler, FutureIssueGridHandler, ManageLanguageGridHandler, ExportableIssuesListGridHandler, TaskNotificationsGridHandler, and PubIdExportSubmissionsListGridHandler.

Definition at line 869 of file GridHandler.inc.php.

References callFeaturesHook(), and getDataProvider().

Referenced by getGridDataElements().

◆ noAutocompleteResults()

GridHandler::noAutocompleteResults ( )
protected

Returns a common 'no matches' result when subclasses find no results for AJAX autocomplete requests.

Returns
JSONMessage JSON object

Definition at line 942 of file GridHandler.inc.php.

Referenced by PKPReviewerGridHandler\getUsersNotAssignedAsReviewers().

◆ renderFilter()

GridHandler::renderFilter (   $request,
  $filterData = array() 
)
protected

◆ renderGridBodyPartsInternally()

GridHandler::renderGridBodyPartsInternally (   $request)
protected

Method that renders tbodys to go in the grid main body.

Parameters
$requestPKPRequest
Returns
array

Definition at line 1066 of file GridHandler.inc.php.

References getGridDataElements(), PKPTemplateManager\getManager(), and renderRowsInternally().

Referenced by doSpecificFetchGridActions().

◆ renderRow()

GridHandler::renderRow (   $request,
  $row 
)

Render the passed row and return its markup.

Parameters
$requestPKPRequest
$rowGridRow
Returns
string

Definition at line 577 of file GridHandler.inc.php.

References renderRowInternally(), and setFirstDataColumn().

Referenced by fetchRow().

◆ renderRowInternally()

GridHandler::renderRowInternally (   $request,
  $row 
)
protected

Method that renders a single row.

NB: You must have initialized the row before you call this method.

Parameters
$requestPKPRequest
$rowGridRow
Returns
string the row HTML

Reimplemented in CategoryGridHandler.

Definition at line 1040 of file GridHandler.inc.php.

References getColumns(), and PKPTemplateManager\getManager().

Referenced by renderRow(), and renderRowsInternally().

◆ renderRowsInternally()

GridHandler::renderRowsInternally (   $request,
$elements 
)
protected

Cycle through the data and get generate the row HTML.

Parameters
$requestPKPRequest
$elementsarray The grid data elements to be rendered.
Returns
array of HTML Strings for Grid Rows.

Definition at line 1015 of file GridHandler.inc.php.

References renderRowInternally().

Referenced by fetchRows(), and renderGridBodyPartsInternally().

◆ saveSequence()

GridHandler::saveSequence (   $args,
  $request 
)

Hook opportunity for grid features to request a save items sequence operation. If no grid feature that implements the saveSequence hook is attached to this grid, this operation will only return the data changed event json message.

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage JSON object

Definition at line 789 of file GridHandler.inc.php.

References callFeaturesHook(), and DAO\getDataChangedEvent().

◆ setDataElementSequence()

GridHandler::setDataElementSequence (   $request,
  $rowId,
  $gridDataElement,
  $newSequence 
)

◆ setEmptyRowText()

◆ setFirstDataColumn()

GridHandler::setFirstDataColumn ( )
protected

Define the first column that will contain grid data.

Override this method to define a different column than the first one.

Reimplemented in CategoryGridHandler.

Definition at line 970 of file GridHandler.inc.php.

References getColumns().

Referenced by fetchCell(), fetchGrid(), fetchRows(), and renderRow().

◆ setFootNote()

GridHandler::setFootNote (   $footNote)

Set the grid foot note.

Parameters
$footNotestring locale key

Definition at line 247 of file GridHandler.inc.php.

Referenced by AdminLanguageGridHandler\initialize().

◆ setGridDataElements()

GridHandler::setGridDataElements (   $data)

Set the grid data.

Parameters
$datamixed an array or ItemIterator with element data

Definition at line 379 of file GridHandler.inc.php.

References callFeaturesHook().

Referenced by getGridDataElements(), SectionGridHandler\initialize(), SwordDepositPointsGridHandler\initialize(), CustomBlockGridHandler\initialize(), and StaticPageGridHandler\initialize().

◆ setTemplate()

GridHandler::setTemplate (   $template)

Set the grid template.

Parameters
$templatestring

Definition at line 411 of file GridHandler.inc.php.

Referenced by ListbuilderHandler\getTemplate(), and getTemplate().

◆ setTitle()

GridHandler::setTitle (   $title)

Set the grid title.

Parameters
$titlestring locale key

Definition at line 215 of file GridHandler.inc.php.

Referenced by EditorSelectableReviewAttachmentsGridHandler\__construct(), ReviewerReviewAttachmentsGridHandler\__construct(), WorkflowReviewRevisionsGridHandler\__construct(), ReviewerReviewFilesGridHandler\__construct(), AuthorReviewRevisionsGridHandler\__construct(), ManageCopyeditFilesGridHandler\__construct(), SelectableCopyeditFilesGridHandler\__construct(), SelectableFinalDraftFilesGridHandler\__construct(), ManageFinalDraftFilesGridHandler\__construct(), SelectableSubmissionDetailsFilesGridHandler\__construct(), EditorSubmissionDetailsFilesGridHandler\__construct(), ManageProofFilesGridHandler\__construct(), ManageQueryNoteFilesGridHandler\__construct(), FinalDraftFilesGridHandler\__construct(), CopyeditFilesGridHandler\__construct(), QueryNoteFilesGridHandler\__construct(), AuthorReviewAttachmentsGridHandler\__construct(), LimitReviewFilesGridHandler\__construct(), SelectableReviewRevisionsGridHandler\__construct(), EditorReviewFilesGridHandler\__construct(), SubmissionWizardFilesGridHandler\__construct(), AuthorSubmissionDetailsFilesGridHandler\__construct(), DependentFilesGridHandler\__construct(), StageParticipantGridHandler\__construct(), ManageReviewFilesGridHandler\__construct(), IndividualSubscriptionsGridHandler\initialize(), InstitutionalSubscriptionsGridHandler\initialize(), TaskNotificationsGridHandler\initialize(), FutureIssueGridHandler\initialize(), ReviewFormElementResponseItemListbuilderHandler\initialize(), SubmissionChecklistGridHandler\initialize(), BackIssueGridHandler\initialize(), SectionGridHandler\initialize(), LanguageGridHandler\initialize(), GenreGridHandler\initialize(), PluginGridHandler\initialize(), SubmissionDocumentsFilesGridHandler\initialize(), PluginGalleryGridHandler\initialize(), ReviewFormGridHandler\initialize(), ProductionReadyFilesGridHandler\initialize(), ExportableUsersGridHandler\initialize(), PLNStatusGridHandler\initialize(), SubscriberSelectGridHandler\initialize(), SubscriptionTypesGridHandler\initialize(), SwordDepositPointsGridHandler\initialize(), UserSelectGridHandler\initialize(), ContextGridHandler\initialize(), UserGridHandler\initialize(), ExportPublishedSubmissionsListGridHandler\initialize(), PubIdExportRepresentationsListGridHandler\initialize(), PubIdExportIssuesListGridHandler\initialize(), CustomBlockGridHandler\initialize(), AnnouncementTypeGridHandler\initialize(), StaticPageGridHandler\initialize(), ReviewFormElementsGridHandler\initialize(), CategoryCategoryGridHandler\initialize(), NavigationMenusGridHandler\initialize(), NavigationMenuItemsGridHandler\initialize(), LibraryFileGridHandler\initialize(), QueryNotesGridHandler\initialize(), UserGroupGridHandler\initialize(), AuthorGridHandler\initialize(), ArticleGalleyGridHandler\initialize(), QueriesGridHandler\initialize(), and PKPReviewerGridHandler\initialize().

◆ setUrls()

GridHandler::setUrls (   $request,
  $extraUrls = array() 
)

Define the urls that will be used in JS handler.

Parameters
$requestPKPRequest
$extraUrlsarray Optional extra urls.

Reimplemented in CategoryGridHandler, and NotificationsGridHandler.

Definition at line 430 of file GridHandler.inc.php.

Referenced by fetchGrid().

Field Documentation

◆ $_actions

array GridHandler::$_actions = array(GRID_ACTION_POSITION_DEFAULT => array())

Grid actions. The first key represents the position of the action in the grid, the second key represents the action id.

Definition at line 92 of file GridHandler.inc.php.

◆ $_columns

array GridHandler::$_columns = array()

The GridColumns of this grid.

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

Referenced by getColumns().

◆ $_constants

array GridHandler::$_constants = []

Constants that should be passed to the template

Definition at line 134 of file GridHandler.inc.php.

◆ $_data

Array GridHandler::$_data

The grid's data source.

Definition at line 104 of file GridHandler.inc.php.

Referenced by getGridDataElements().

◆ $_dataProvider

GridDataProvider GridHandler::$_dataProvider

Definition at line 82 of file GridHandler.inc.php.

Referenced by getDataProvider().

◆ $_emptyRowText

string GridHandler::$_emptyRowText = 'grid.noItems'

empty row locale key

Definition at line 70 of file GridHandler.inc.php.

Referenced by getEmptyRowText().

◆ $_features

array GridHandler::$_features

The grid features.

Definition at line 128 of file GridHandler.inc.php.

Referenced by getFeatures().

◆ $_footNote

string GridHandler::$_footNote = ''

Grid foot note locale key

Definition at line 76 of file GridHandler.inc.php.

Referenced by getFootNote().

◆ $_itemIterator

ItemIterator GridHandler::$_itemIterator

The item iterator to be used for paging.

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

Referenced by getItemIterator().

◆ $_template

string GridHandler::$_template

The grid template.

Definition at line 116 of file GridHandler.inc.php.

Referenced by ListbuilderHandler\getTemplate(), and getTemplate().

◆ $_title

string GridHandler::$_title = ''

grid title locale key

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

Referenced by getTitle().

◆ $_urls

array GridHandler::$_urls

The urls that will be used in JS handler.

Definition at line 122 of file GridHandler.inc.php.

Referenced by getUrls().


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