Open Journal Systems  3.3.0
GridFeature Class Reference
Inheritance diagram for GridFeature:
CollapsibleGridFeature GeneralPagingFeature OrderItemsFeature SelectableItemsFeature InfiniteScrollingFeature PagingFeature OrderCategoryGridItemsFeature OrderGridItemsFeature OrderListbuilderItemsFeature

Public Member Functions

 __construct ($id)
 
 addOptions ($options)
 
 fetchGrid ($args)
 
 fetchRow ($args)
 
 fetchRows ($args)
 
 fetchUIElements ($request, $grid)
 
 getGridDataElements ($args)
 
 getGridRangeInfo ($args)
 
 getId ()
 
 getInitializedCategoryRowInstance ($args)
 
 getInitializedRowInstance ($args)
 
 getJSClass ()
 
 getOptions ()
 
 getRequestArgs ($args)
 
 gridInitialize ($args)
 
 loadData ($args)
 
 saveSequence ($args)
 
 setGridDataElements ($args)
 
 setId ($id)
 
 setOptions ($request, $grid)
 

Data Fields

 $_id
 
 $_options
 

Detailed Description

Base grid feature class. A feature is a type of plugin specific to the grid widgets. It provides several hooks to allow injection of additional grid functionality. This class implements template methods to be extended by subclasses.

Definition at line 20 of file GridFeature.inc.php.

Constructor & Destructor Documentation

◆ __construct()

GridFeature::__construct (   $id)

Constructor.

Parameters
$idstring Feature id.

Reimplemented in PagingFeature, and CollapsibleGridFeature.

Definition at line 38 of file GridFeature.inc.php.

References setId().

Member Function Documentation

◆ addOptions()

GridFeature::addOptions (   $options)

Add feature js class options.

Parameters
$optionsarray $optionId => $optionValue

Definition at line 74 of file GridFeature.inc.php.

References getOptions().

Referenced by OrderCategoryGridItemsFeature\__construct(), GeneralPagingFeature\getGridDataElements(), GeneralPagingFeature\setOptions(), setOptions(), and OrderItemsFeature\setOptions().

◆ fetchGrid()

GridFeature::fetchGrid (   $args)

Hook called on grid fetching.

Parameters
$argsarray 'grid' => GridHandler

Definition at line 218 of file GridFeature.inc.php.

References setOptions().

◆ fetchRow()

GridFeature::fetchRow (   $args)

Hook called after a row is fetched.

Parameters
$argsarray 'request' => PKPRequest 'grid' => GridHandler 'row' => mixed GridRow or null 'jsonMessage' => JSONMessage

Reimplemented in InfiniteScrollingFeature, and PagingFeature.

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

◆ fetchRows()

GridFeature::fetchRows (   $args)

Hook called after a group of rows is fetched.

Parameters
$argsarray 'request' => PKPRequest 'grid' => GridHandler 'jsonMessage' => JSONMessage

Reimplemented in InfiniteScrollingFeature.

Definition at line 232 of file GridFeature.inc.php.

◆ fetchUIElements()

GridFeature::fetchUIElements (   $request,
  $grid 
)

Fetch any user interface elements that this feature needs to add its functionality into the grid. Use this only for ui elements that grid will not fetch itself.

Parameters
$requestPKPRequest
$gridGridHandler The grid that this feature is attached to.
Returns
array It is expected that the array returns data in this format: $elementId => $elementMarkup

Reimplemented in OrderItemsFeature, PagingFeature, InfiniteScrollingFeature, and CollapsibleGridFeature.

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

Referenced by setOptions().

◆ getGridDataElements()

GridFeature::getGridDataElements (   $args)

Hook called when grid data is retrieved.

Parameters
$argsarray 'request' => PKPRequest 'grid' => GridHandler 'gridData' => mixed (array or ItemIterator) 'filter' => array

Reimplemented in GeneralPagingFeature.

Definition at line 159 of file GridFeature.inc.php.

◆ getGridRangeInfo()

GridFeature::getGridRangeInfo (   $args)

Hook called every time the grid range info is retrieved.

Parameters
$argsarray 'request' => PKPRequest 'grid' => GridHandler 'rangeInfo' => DBResultRange

Reimplemented in GeneralPagingFeature.

Definition at line 147 of file GridFeature.inc.php.

◆ getId()

GridFeature::getId ( )

Get feature id.

Returns
string

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

References $_id.

◆ getInitializedCategoryRowInstance()

GridFeature::getInitializedCategoryRowInstance (   $args)

Hook called on grid category row initialization.

Parameters
$argsarray 'request' => PKPRequest 'grid' => CategoryGridHandler 'categoryId' => int 'row' => GridCategoryRow

Reimplemented in OrderCategoryGridItemsFeature.

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

◆ getInitializedRowInstance()

GridFeature::getInitializedRowInstance (   $args)

Hook called every time grid initialize a row object.

Parameters
$argsarray 'grid' => GridHandler, 'row' => GridRow

Reimplemented in OrderItemsFeature, OrderCategoryGridItemsFeature, and SelectableItemsFeature.

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

◆ getJSClass()

GridFeature::getJSClass ( )

Return the java script feature class.

Returns
string|null

Reimplemented in OrderCategoryGridItemsFeature, InfiniteScrollingFeature, PagingFeature, OrderGridItemsFeature, OrderListbuilderItemsFeature, and CollapsibleGridFeature.

Definition at line 118 of file GridFeature.inc.php.

◆ getOptions()

◆ getRequestArgs()

GridFeature::getRequestArgs (   $args)

Hook called every time grid request args are required. Note that if the specific grid implementation extends the getRequestArgs method, this hook will only be called if the extending method call its parent.

Parameters
$argsarray 'grid' => GridHandler 'requestArgs' => array

Reimplemented in GeneralPagingFeature.

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

◆ gridInitialize()

GridFeature::gridInitialize (   $args)

Hook called on grid's initialization.

Parameters
$argsarray Contains the grid handler referenced object in 'grid' array index.

Reimplemented in OrderItemsFeature, and SelectableItemsFeature.

Definition at line 199 of file GridFeature.inc.php.

◆ loadData()

GridFeature::loadData (   $args)

Hook called on grid's data loading.

Parameters
$argsarray 'request' => PKPRequest, 'grid' => GridHandler, 'gridData' => array

Definition at line 210 of file GridFeature.inc.php.

◆ saveSequence()

GridFeature::saveSequence (   $args)

Hook called when save grid items sequence is requested.

Parameters
$argsarray 'request' => PKPRequest, 'grid' => GridHandler

Reimplemented in OrderCategoryGridItemsFeature, and OrderGridItemsFeature.

Definition at line 254 of file GridFeature.inc.php.

◆ setGridDataElements()

GridFeature::setGridDataElements (   $args)

Hook called before grid data is setted.

Parameters
$argsarray 'grid' => GridHandler 'data' => mixed (array or ItemIterator)

Reimplemented in GeneralPagingFeature.

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

◆ setId()

GridFeature::setId (   $id)

Set feature id.

Parameters
$idstring

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

Referenced by __construct().

◆ setOptions()

GridFeature::setOptions (   $request,
  $grid 
)

Set feature js class options. Extend this method to define more feature js class options.

Parameters
$requestPKPRequest
$gridGridHandler

Reimplemented in OrderItemsFeature, and GeneralPagingFeature.

Definition at line 89 of file GridFeature.inc.php.

References addOptions(), and fetchUIElements().

Referenced by fetchGrid().

Field Documentation

◆ $_id

string GridFeature::$_id

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

Referenced by getId().

◆ $_options

array GridFeature::$_options

Definition at line 32 of file GridFeature.inc.php.

Referenced by getOptions().


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