class geofieldProximityManual in Geofield 7.2
@file Contains geofieldProximityManual.
Hierarchy
- class \geofieldProximityBase implements geofieldProximityPluginInterface
- class \geofieldProximityManual implements geofieldProximityPluginInterface
Expanded class hierarchy of geofieldProximityManual
1 string reference to 'geofieldProximityManual'
- geofield_proximity_views_handlers in views/
geofield.views.inc - Implements hook proximity_views_handlers().
File
- views/
proximity_plugins/ geofieldProximityManual.inc, line 8 - Contains geofieldProximityManual.
View source
class geofieldProximityManual extends geofieldProximityBase implements geofieldProximityPluginInterface {
public function option_definition(&$options, $views_plugin) {
$options['geofield_proximity_manual'] = array(
'default' => array(
'lat' => 0,
'lon' => 0,
),
);
}
public function options_form(&$form, &$form_state, $views_plugin) {
$form['geofield_proximity_manual'] = array(
'#type' => 'geofield_latlon',
'#title' => t('Source'),
'#default_value' => $views_plugin->options['geofield_proximity_manual'],
'#proximity_plugin_value_element' => TRUE,
'#states' => array(
'visible' => array(
':input[name*="options[source]"]' => array(
'value' => 'manual',
),
),
),
);
}
public function value_form(&$form, &$form_state, $views_plugin) {
$form['value']['#origin_element'] = 'geofield_latlon';
}
public function getSourceValue($views_plugin) {
return array(
'latitude' => isset($views_plugin->value) ? $views_plugin->value['origin']['lat'] : $views_plugin->options['geofield_proximity_manual']['lat'],
'longitude' => isset($views_plugin->value) ? $views_plugin->value['origin']['lon'] : $views_plugin->options['geofield_proximity_manual']['lon'],
);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
geofieldProximityBase:: |
public | function |
Overrides geofieldProximityPluginInterface:: |
2 |
geofieldProximityBase:: |
public | function |
Overrides geofieldProximityPluginInterface:: |
|
geofieldProximityManual:: |
public | function |
Overrides geofieldProximityBase:: |
|
geofieldProximityManual:: |
public | function |
Overrides geofieldProximityBase:: |
|
geofieldProximityManual:: |
public | function |
All methods in geofieldProximityPluginInterface maps directly to a
method in a views_handler class, expect for 'getSourceValue,' which
is primarily called in the 'query' method, but also in other instances. Overrides geofieldProximityBase:: |
|
geofieldProximityManual:: |
public | function |
Overrides geofieldProximityBase:: |