public function __construct() { parent::__construct("foldall", Column::VIEW_NONE); }
function ajaxColumn($fieldId) { if (!$this->_prepare() || !($fdef = PaperColumn::lookup($fieldId))) { return null; } // field is never folded, no sorting $fname = $fdef->name; $this->viewmap->{$fname} = true; if ($fname === "authors") { $this->viewmap->au = true; } assert(!$this->is_folded($fdef)); $this->sorters = array(); // get rows $field_list = $this->_prepare_columns(array($fdef)); $rows = $this->_rows($field_list); if ($rows === null) { return null; } // output field data $data = array(); if ($x = $fdef->header($this, 0)) { $data["{$fname}.headerhtml"] = $x; } $m = array(); foreach ($rows as $rowidx => $row) { $this->row_attr = []; if ($fdef->content_empty($this, $row)) { $m[$row->paperId] = ""; } else { $m[$row->paperId] = $fdef->content($this, $row, $rowidx); } foreach ($this->row_attr as $k => $v) { if (!isset($data["attr.{$k}"])) { $data["attr.{$k}"] = []; } $data["attr.{$k}"][$row->paperId] = $v; } } $data["{$fname}.html"] = $m; if ($fdef->has_content) { $this->any->{$fname} = true; } return $data; }
public function __construct() { parent::__construct("autoassignment", Column::VIEW_ROW, array("className" => "pl_autoassignment")); }