You are here

function geofield_proximity_load_plugin in Geofield 7.2

Loads an individual geofield proximity views class.

Return value

An instance of a class defined by $plugin (see keys for geofield_proximity_views_handlers), or FALSE if no such class exists.

9 calls to geofield_proximity_load_plugin()
geofieldProximityExposedFilter::getSourceValue in views/proximity_plugins/geofieldProximityExposedFilter.inc
geofield_handler_field::options_validate in views/handlers/geofield_handler_field.inc
Validate the options form.
geofield_handler_field::query in views/handlers/geofield_handler_field.inc
Called to add the field to a query.
geofield_handler_filter::options_validate in views/handlers/geofield_handler_filter.inc
Simple validate handler.
geofield_handler_filter::query in views/handlers/geofield_handler_filter.inc
Add this filter to the query.

... See full list

File

views/geofield.views.inc, line 133
Hooks for Views integration.

Code

function geofield_proximity_load_plugin($plugin) {
  $handlers = module_invoke_all('proximity_views_handlers');

  //module_load_include('inc', 'geofield', 'views/proximity_plugins/geofieldProximityManual');
  module_load_include('inc', $handlers[$plugin]['module'], $handlers[$plugin]['path'] . '/' . $handlers[$plugin]['class']);
  if (class_exists($handlers[$plugin]['class'])) {
    return new $handlers[$plugin]['class']();
  }
  else {
    return FALSE;
  }
}