/** * * @access public * @return void */ public function NewAction($actionType, $params = array()) { $className = 'GridAction' . $actionType; loadGridComponent('Action', $className); $params['JsOwnerForm'] = $this->javascriptFormOwnerName == 'document.forms[0]' ? 'document.forms[0]' : 'document.forms[\'' . $this->javascriptFormOwnerName . '\']'; $action = new $className($params); $this->_Action[] = $action; $action->index = $this->_getActionCount() - 1; if ($action->renderer == 'Inline') { $this->hasInlineActions = true; } return $action; }
/** * AbstractGrid::NewColumn() * * @param $columnType * @param $title * @param array $params * @return object AbstractGridColumn */ public function NewColumn($columnType, $title, $params = array()) { if ($this->withNoSortableColumn) { $params['Sortable'] = false; } $className = 'GridColumn' . $columnType; loadGridComponent('Column', $className); $column = new $className($title, $params); $column->index = count($this->columns); $column->groupCount = 0; $this->columns[$column->index] = $column; return $column; }