Open Journal Systems  3.3.0
GridColumn Class Reference
Inheritance diagram for GridColumn:
GridBodyElement FileDateGridColumn FileGenreGridColumn FileNameGridColumn ItemSelectionGridColumn ListbuilderGridColumn QueryTitleGridColumn MultilingualListbuilderGridColumn

Public Member Functions

 __construct ($id='', $title=null, $titleTranslated=null, $template=null, $cellProvider=null, $flags=array())
 
 getCellActions ($request, $row, $position=GRID_ACTION_POSITION_DEFAULT)
 
 getCellProvider ()
 
 getLocalizedTitle ()
 
 getTemplate ()
 
 getTitle ()
 
 setTemplate ($template)
 
 setTitle ($title)
 
 setTitleTranslated ($titleTranslated)
 
- Public Member Functions inherited from GridBodyElement
 __construct ($id='', $cellProvider=null, $flags=array())
 
 addFlag ($flag, $value=true)
 
 getFlag ($flag)
 
 getFlags ()
 
 getId ()
 
 hasFlag ($flag)
 
 setCellProvider ($cellProvider)
 
 setId ($id)
 

Data Fields

 $_template
 
 $_title
 
 $_titleTranslated
 
- Data Fields inherited from GridBodyElement
 $_cellProvider
 
 $_flags
 
 $_id
 

Detailed Description

The GridColumn class represents a column within a grid. It is used to format the data presented in a particular column, which is provided by the GridRow implementation, and to handle user operations on that column (such as clicking a checkbox).

For general information on grids, see GridHandler.

Definition at line 27 of file GridColumn.inc.php.

Constructor & Destructor Documentation

◆ __construct()

GridColumn::__construct (   $id = '',
  $title = null,
  $titleTranslated = null,
  $template = null,
  $cellProvider = null,
  $flags = array() 
)

Constructor

Parameters
$idstring Grid column identifier
$titlestring Locale key for grid column title
$titleTranslatedstring Optional translated grid title
$templatestring Optional template filename for grid column, including path
$cellProviderGridCellProvider Optional grid cell provider for this column
$flagsarray Optional set of flags for this grid column

Definition at line 55 of file GridColumn.inc.php.

Member Function Documentation

◆ getCellActions()

GridColumn::getCellActions (   $request,
  $row,
  $position = GRID_ACTION_POSITION_DEFAULT 
)

Get cell actions for this column.

NB: Subclasses have to override this method to actually provide cell-specific actions. The default implementation returns an empty array.

Parameters
$rowGridRow The row for which actions are being requested.
Returns
array An array of LinkActions for the cell.

Reimplemented in FileNameGridColumn, and QueryTitleGridColumn.

Definition at line 145 of file GridColumn.inc.php.

◆ getCellProvider()

GridColumn::getCellProvider ( )
See also
GridBodyElement::getCellProvider()

Reimplemented from GridBodyElement.

Definition at line 123 of file GridColumn.inc.php.

References GridBodyElement\setCellProvider().

◆ getLocalizedTitle()

GridColumn::getLocalizedTitle ( )

Get the translated column title

Returns
string

Definition at line 99 of file GridColumn.inc.php.

References $_titleTranslated.

◆ getTemplate()

GridColumn::getTemplate ( )

get the column's cell template

Returns
string

Definition at line 108 of file GridColumn.inc.php.

References $_template.

◆ getTitle()

GridColumn::getTitle ( )

Get the column title

Returns
string

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

References $_title.

◆ setTemplate()

GridColumn::setTemplate (   $template)

set the column's cell template

Parameters
$templatestring

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

◆ setTitle()

GridColumn::setTitle (   $title)

Set the column title (already translated)

Parameters
$titlestring

Definition at line 83 of file GridColumn.inc.php.

◆ setTitleTranslated()

GridColumn::setTitleTranslated (   $titleTranslated)

Set the column title (already translated)

Parameters
$titlestring

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

Field Documentation

◆ $_template

string GridColumn::$_template

the controller template for the cells in this column

Definition at line 44 of file GridColumn.inc.php.

Referenced by getTemplate().

◆ $_title

string GridColumn::$_title

the column title i18n key

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

Referenced by getTitle().

◆ $_titleTranslated

string GridColumn::$_titleTranslated

the column title (translated)

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

Referenced by getLocalizedTitle().


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