You are here

function spaces_views_pre_query in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces.module \spaces_views_pre_query()

Implementation of hook_views_pre_query().

File

./spaces.module, line 288

Code

function spaces_views_pre_query(&$view) {

  // Make spaces filter'd views non-cacheable
  foreach ($view->filter as $filter) {
    if ($filter['field'] == 'spaces.type') {
      $view->is_cacheable = false;
    }
  }
  if ($view->build_type == 'page' && ($space = spaces_get_space())) {
    if ($feature = context_get('spaces', 'feature')) {
      $view = space_customizer_views::customize($space, $feature, $view);
    }
  }
}