function lingotek_grid_get_columns in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.bulk_grid.inc \lingotek_grid_get_columns()
- 7.4 lingotek.bulk_grid.inc \lingotek_grid_get_columns()
- 7.5 lingotek.bulk_grid.inc \lingotek_grid_get_columns()
Gets the columns that will be shown from the session variable
Parameters
string $grid_name: Changes whether this will be for the normal grids or for config
Return value
array $columns Associative array keyed by column name with prefix and suffix removed Keys point to a bool which specifies if the column should be shown or not
2 calls to lingotek_grid_get_columns()
File
- ./
lingotek.bulk_grid.inc, line 912
Code
function lingotek_grid_get_columns($grid_name = 'grid') {
$filters = array();
if (!isset($_SESSION[$grid_name . '_custom'])) {
// If the columns do not exist yet in the session variable we get an error, so reset them here.
lingotek_grid_reset_columns();
}
foreach ($_SESSION[$grid_name . '_custom'] as $key => $value) {
$columns[str_replace('__custom', '', $key)] = $value;
}
return $columns;
}