You are here

function lingotek_grid_reset_columns in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_grid_reset_columns()
  2. 7.5 lingotek.bulk_grid.inc \lingotek_grid_reset_columns()
  3. 7.6 lingotek.bulk_grid.inc \lingotek_grid_reset_columns()

Cleans up the grid_custom session array, restoring the predefined defaults.

1 call to lingotek_grid_reset_columns()
lingotek_grid_get_columns in ./lingotek.bulk_grid.inc
Gets the columns that will be shown from the session variable
1 string reference to 'lingotek_grid_reset_columns'
lingotek_grid_customize_form in ./lingotek.bulk_grid.inc

File

./lingotek.bulk_grid.inc, line 713
Bulk Grid form

Code

function lingotek_grid_reset_columns() {
  if (isset($_SESSION['grid_custom'])) {
    unset($_SESSION['grid_custom']);
  }
  $source_columns = lingotek_grid_define_columns();
  foreach ($source_columns['columns'] as $column) {
    $_SESSION['grid_custom'][$column . '__custom'] = in_array($column, $source_columns['defaults']);
  }
}