Open Monograph Press  3.3.0
RepresentativesGridCellProvider.inc.php
1 <?php
2 
16 import('lib.pkp.classes.controllers.grid.DataObjectGridCellProvider');
17 
22  function __construct() {
23  parent::__construct();
24  }
25 
26  //
27  // Template methods from GridCellProvider
28  //
36  function getTemplateVarsFromRowColumn($row, $column) {
37  $element = $row->getData();
38 
39  $columnId = $column->getId();
40  assert(is_a($element, 'DataObject') && !empty($columnId));
41  switch ($columnId) {
42  case 'role':
43  return array('label' => $element->getNameForONIXCode());
44  case 'name':
45  return array('label' => $element->getName());
46  }
47  }
48 }
49 
50 
RepresentativesGridCellProvider
Base class for a cell provider that can retrieve labels for representatives.
Definition: RepresentativesGridCellProvider.inc.php:18
DataObjectGridCellProvider
Base class for a cell provider that can retrieve simple labels from DataObjects. If you need more com...
Definition: DataObjectGridCellProvider.inc.php:22
RepresentativesGridCellProvider\getTemplateVarsFromRowColumn
getTemplateVarsFromRowColumn($row, $column)
Definition: RepresentativesGridCellProvider.inc.php:36
RepresentativesGridCellProvider\__construct
__construct()
Definition: RepresentativesGridCellProvider.inc.php:22