function lingotek_grid_get_columns in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.bulk_grid.inc \lingotek_grid_get_columns()
- 7.5 lingotek.bulk_grid.inc \lingotek_grid_get_columns()
- 7.6 lingotek.bulk_grid.inc \lingotek_grid_get_columns()
Gets the columns that will be shown from the session variable
Parameters
bool $source: Changes whether settings for source or target variables are output
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()
- lingotek_bulk_grid_form in ./
lingotek.bulk_grid.inc - @file Bulk Grid form
- lingotek_grid_customize_form in ./
lingotek.bulk_grid.inc
File
- ./
lingotek.bulk_grid.inc, line 696 - Bulk Grid form
Code
function lingotek_grid_get_columns() {
$filters = array();
if (!isset($_SESSION['grid_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_custom'] as $key => $value) {
$columns[str_replace('__custom', '', $key)] = $value;
}
return $columns;
}