Open Journal Systems  3.3.0
ItemSelectionGridColumn.inc.php
1 <?php
15 import('lib.pkp.classes.controllers.grid.GridColumn');
16 
18 
20  var $_selectName;
21 
22 
28  function __construct($selectName) {
29  assert(is_string($selectName) && !empty($selectName));
30  $this->_selectName = $selectName;
31 
32  import('lib.pkp.classes.controllers.grid.ColumnBasedGridCellProvider');
33  $cellProvider = new ColumnBasedGridCellProvider();
34  parent::__construct('select', 'common.select', null, 'controllers/grid/gridRowSelectInput.tpl', $cellProvider,
35  array('width' => 3));
36  }
37 
38 
39  //
40  // Getters and Setters
41  //
46  function getSelectName() {
47  return $this->_selectName;
48  }
49 
50 
51  //
52  // Public methods
53  //
60  function getTemplateVarsFromRow($row) {
61  // Return the data expected by the column's cell template.
62  return array(
63  'elementId' => $row->getId(),
64  'selectName' => $this->getSelectName(),
65  'selected' => $row->getFlag('selected'));
66  }
67 }
68 
69 
ColumnBasedGridCellProvider
A cell provider that relies on the column implementation to provide cell content. Use this cell provi...
Definition: ColumnBasedGridCellProvider.inc.php:24
GridColumn
The GridColumn class represents a column within a grid. It is used to format the data presented in a ...
Definition: GridColumn.inc.php:27
ItemSelectionGridColumn\__construct
__construct($selectName)
Definition: ItemSelectionGridColumn.inc.php:31
ItemSelectionGridColumn
Implements a column with checkboxes to select grid items.
Definition: ItemSelectionGridColumn.inc.php:17
ItemSelectionGridColumn\getTemplateVarsFromRow
getTemplateVarsFromRow($row)
Definition: ItemSelectionGridColumn.inc.php:63
ItemSelectionGridColumn\getSelectName
getSelectName()
Definition: ItemSelectionGridColumn.inc.php:49
ItemSelectionGridColumn\$_selectName
$_selectName
Definition: ItemSelectionGridColumn.inc.php:23