protected function getListFilter()
{
$filter = array();
// if POST, then a new filter is to be applied, otherwise retrieve from the session
if ($this->request->isPostRequest) {
foreach (array('date_from', 'date_to', 'subspecialty_id', 'site_id', 'consultant_ids', 'show_issued') as $key) {
$val = $this->request->getPost($key, null);
$filter[$key] = $val;
}
} else {
if ($session_filter = $this->getApp()->session[static::$FILTER_LIST_KEY]) {
$filter = $session_filter;
}
}
// set the is filtered flag for the controller
foreach ($filter as $val) {
if ($val) {
$this->is_list_filtered = true;
break;
}
}
// store filter for later use
$this->getApp()->session[static::$FILTER_LIST_KEY] = $filter;
return $filter;
}