You are here

function _views_navigation_get_query_plugin in Views navigation 7

Function for getting the query plugin type.

Parameters

object $query: The query object.

Return value

string Either search_api or default.

4 calls to _views_navigation_get_query_plugin()
views_navigation_get_result in ./views_navigation.inc
Get the result of a query, as an array of etids keyed by position.
views_navigation_store_query in ./views_navigation.inc
Store a view query in cache.
_views_navigation_build_query in ./views_navigation.inc
Add the query parameters to append to the entity url.
_views_navigation_query_is_supported in ./views_navigation.inc
Function for check views navigation query is supported.

File

./views_navigation.inc, line 365
Views navigation main include file.

Code

function _views_navigation_get_query_plugin($query) {

  // ATM we only handle the default and Search API views queries.
  if (is_a($query, 'views_plugin_query_default')) {
    return 'default';
  }
  if (is_a($query, 'SearchApiViewsQuery')) {
    return 'search_api';
  }
}