/** * Set up by customInfo: * - Header list * - Action menu * @param customInfo includes acl and customInfo. */ public function setupByCustomInfo($customInfo) { //Prepare customInfo $acl = $customInfo['acl']; $listInfo = $customInfo['listInfo']->getColList(); //build a map of currentView first. $this->headerListMap = array(); $this->customColMap = array(); $this->headerList = array(); //Allocating width based on total width minus a margin. $tot = 0; foreach ($listInfo as $col) { $tot += $col->getWidth(); } foreach ($listInfo as $col) { if ($acl[$col->getId()]) { continue; } //skip fields that in the acl. $w = CalemReportUtil::getColWidth($tot, $col->getWidth()); $col->setWidth($w); $this->customColMap[$col->getId()] = $col; $this->addColumn($col->getId(), true); } }