24 define(
'GRID_ACTION_POSITION_ROW_CLICK',
'row-click');
25 define(
'GRID_ACTION_POSITION_ROW_LEFT',
'row-left');
27 import(
'lib.pkp.classes.controllers.grid.GridBodyElement');
48 var
$_actions = array(GRID_ACTION_POSITION_DEFAULT => array());
58 parent::__construct();
60 $this->_isModified =
false;
72 $this->_gridId = $gridId;
89 $this->_requestArgs = $requestArgs;
106 $this->_data =& $data;
122 $this->_isModified = $isModified;
138 $allActions = array();
139 foreach($this->_actions as $actions) {
140 $allActions = array_merge($allActions, $actions);
143 return !empty($allActions);
151 function getActions($position = GRID_ACTION_POSITION_DEFAULT) {
152 if(!isset($this->_actions[$position]))
return array();
153 return $this->_actions[$position];
161 function addAction($action, $position = GRID_ACTION_POSITION_DEFAULT) {
162 if (!isset($this->_actions[$position])) $this->_actions[$position] = array();
163 $this->_actions[$position][$action->getId()] = $action;
180 $this->_template = $template;
194 function initialize($request, $template =
null) {
195 if ($template ===
null) $template =
'controllers/grid/gridRow.tpl';