You are here

function spaces_handler_filter_type in Spaces 5.2

Spaces view filter handler.

1 string reference to 'spaces_handler_filter_type'
spaces_views_tables in ./spaces_views.inc
Implementation of hook_views_tables(). Adds a meta-filter that provides a layer of abstraction that delegates actual filtering to the implementing space type modules.

File

./spaces_views.inc, line 43

Code

function spaces_handler_filter_type($op, $filter, $filterinfo, &$query) {
  $space = spaces_get_space();
  if ($space) {
    if ($filter['value'] == $space->type || $filter['value'] == 'all') {
      $space
        ->views_filter(TRUE, $query);
    }
  }
  else {
    if ($filter['operator'] == 'all') {
      $types = spaces_types();
      foreach ($types as $type => $info) {
        call_user_func(array(
          $info['class'],
          'views_filter',
        ), FALSE, $query);
      }
    }
  }
}