PHP Class GridCellProvider, pkp-lib

Mostrar archivo Open project: pkp/pkp-lib Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor
getCellActions ( $request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT ) : array Subclasses can override this template method to provide cell specific actions.
getTemplateVarsFromRowColumn ( $row, $column ) : array Subclasses have to implement this method to extract variables for a given column from a data element so that they may be assigned to template before rendering.
render ( $request, $row, $column ) : string To be used by a GridRow to generate a rendered representation of the element for the given column.

Method Details

__construct() public method

Constructor
public __construct ( )

getCellActions() public method

NB: The default implementation delegates to the grid column for cell-specific actions. Another thinkable implementation would be row-specific actions in which case action instantiation should be delegated to the row.
public getCellActions ( $request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT ) : array
$request Request
$row GridRow
$column GridColumn
$position int GRID_ACTION_POSITION_...
return array an array of LinkAction instances

getTemplateVarsFromRowColumn() public method

Subclasses have to implement this method to extract variables for a given column from a data element so that they may be assigned to template before rendering.
public getTemplateVarsFromRowColumn ( $row, $column ) : array
$row GridRow
$column GridColumn
return array

render() public method

To be used by a GridRow to generate a rendered representation of the element for the given column.
public render ( $request, $row, $column ) : string
$row GridRow
$column GridColumn
return string the rendered representation of the element for the given column