/** * Sets the column visible (and add it as the last in the coloumn display order) * @param boolean $visible * @return P4A_Table_Col */ public function setVisible($visible = true) { parent::setVisible($visible); $p4a = P4A::singleton(); $parent = $this->getParentID(); $parent = $p4a->objects[$parent]->getParentID(); $parent = $p4a->objects[$parent]; if ($visible and !empty($parent->_cols_order) and !in_array($this->getName(), $parent->_cols_order)) { $parent->_cols_order[] = $this->getName(); } return $this; }