@@ 1627-1644 (lines=18) @@ | ||
1624 | * @param string $column |
|
1625 | * @return void |
|
1626 | */ |
|
1627 | public function handleShowColumn($column) |
|
1628 | { |
|
1629 | $columns = $this->getSessionData('_grid_hidden_columns'); |
|
1630 | ||
1631 | if (!empty($columns)) { |
|
1632 | $pos = array_search($column, $columns); |
|
1633 | ||
1634 | if ($pos !== FALSE) { |
|
1635 | unset($columns[$pos]); |
|
1636 | } |
|
1637 | } |
|
1638 | ||
1639 | $this->saveSessionData('_grid_hidden_columns', $columns); |
|
1640 | ||
1641 | $this->redrawControl(); |
|
1642 | ||
1643 | $this->onRedraw(); |
|
1644 | } |
|
1645 | ||
1646 | ||
1647 | /** |
|
@@ 1652-1670 (lines=19) @@ | ||
1649 | * @param string $column |
|
1650 | * @return void |
|
1651 | */ |
|
1652 | public function handleHideColumn($column) |
|
1653 | { |
|
1654 | /** |
|
1655 | * Store info about hiding a column to session |
|
1656 | */ |
|
1657 | $columns = $this->getSessionData('_grid_hidden_columns'); |
|
1658 | ||
1659 | if (empty($columns)) { |
|
1660 | $columns = [$column]; |
|
1661 | } else if (!in_array($column, $columns)) { |
|
1662 | array_push($columns, $column); |
|
1663 | } |
|
1664 | ||
1665 | $this->saveSessionData('_grid_hidden_columns', $columns); |
|
1666 | ||
1667 | $this->redrawControl(); |
|
1668 | ||
1669 | $this->onRedraw(); |
|
1670 | } |
|
1671 | ||
1672 | ||
1673 | public function handleActionCallback($__key, $__id) |