function lingotek_grid_clear_filters in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 lingotek.bulk_grid.inc \lingotek_grid_clear_filters()
- 7.5 lingotek.bulk_grid.inc \lingotek_grid_clear_filters()
- 7.6 lingotek.bulk_grid.inc \lingotek_grid_clear_filters()
Completely clears out any filters from the session variable Filters will automatically revert to their defaults
1 call to lingotek_grid_clear_filters()
1 string reference to 'lingotek_grid_clear_filters'
File
- ./
lingotek.bulk_grid.inc, line 1730
Code
function lingotek_grid_clear_filters($entity_type = NULL) {
if ($entity_type === NULL || is_array($entity_type)) {
if (empty($_SESSION['grid_entity_type'])) {
throw new LingotekException('Attempted to clear filters on an empty entity type!');
}
$entity_type = $_SESSION['grid_entity_type'];
}
if (isset($_SESSION['grid_filters'][$entity_type])) {
unset($_SESSION['grid_filters'][$entity_type]);
session_write_close();
}
}