protected function translateFilterValues($reset = FALSE
) { if (!
$reset &&
static::
$filterValues) { return static::
$filterValues;
} $filter_values =
[];
$filters =
$this->
translateFilters();
$request =
$this->
getRequest();
$session_filters =
$request->
getSession()->
get('locale_translate_filter',
[]);
foreach ($filters as $key =>
$filter) { $filter_values[$key] =
$filter['default'
];
// Let the filter defaults be overwritten by parameters in the URL.
if ($request->query->
has($key)) { // Only allow this value if it was among the options, or
// if there were no fixed options to filter for.
$value =
$request->query->
get($key);
if (!
isset($filter['options'
]) ||
isset($filter['options'
][$value])) { $filter_values[$key] =
$value;
}