You are here

function global_filter_key_by_name in Views Global Filter 7

Same name and namespace in other branches
  1. 8 global_filter.module \global_filter_key_by_name()

Get filter key by name.

5 calls to global_filter_key_by_name()
global_filter_field_slider_widget_form_alter in widgets/global_filter.rangewidget.inc
Called via hook_field_widget_form_alter().
global_filter_get_global_default in ./global_filter.module
Get the global default for the filter by the supplied name or index.
global_filter_options_none in ./global_filter.widgets.inc
Override of the theme_options_none() function.
global_filter_plugin_argument_default_global_filter_field::get_argument in views/global_filter_plugin_argument_default_global_filter_field.inc
Get argument.
global_filter_plugin_argument_default_global_filter_proximity::get_argument in views/global_filter_plugin_argument_default_global_filter_proximity.inc
Get argument.

File

./global_filter.module, line 450
global_filter.module

Code

function global_filter_key_by_name($name) {
  foreach (global_filter_get_parameter(NULL) as $filter_key => $filter) {
    if ($filter['name'] == $name) {
      return $filter_key;
    }
  }
  return FALSE;
}