function getlocations_fields_handler_sort_distance::extra_options_form in Get Locations 7.2
Same name and namespace in other branches
- 7 modules/getlocations_fields/handlers/getlocations_fields_handler_sort_distance.inc \getlocations_fields_handler_sort_distance::extra_options_form()
Provide a form for setting options.
Overrides views_handler::extra_options_form
File
- modules/
getlocations_fields/ handlers/ getlocations_fields_handler_sort_distance.inc, line 37 - getlocations_fields_handler_sort_distance.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Class
- getlocations_fields_handler_sort_distance
- @file getlocations_fields_handler_sort_distance.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function extra_options_form(&$form, &$form_state) {
$form['origin'] = getlocations_fields_element_origin($this->options['origin'], TRUE);
$form['latitude'] = getlocations_fields_element_latitude($this->options['latitude']);
$form['longitude'] = getlocations_fields_element_longitude($this->options['longitude']);
# $form['postal_code'] = getlocations_fields_element_postal_code($this->options['postal_code']);
# $form['country'] = getlocations_fields_element_country($this->options['country']);
$form['php_code'] = getlocations_fields_element_php_code($this->options['php_code']);
list($nid_argument_options, $uid_argument_options, $tid_argument_options, $cid_argument_options) = getlocations_fields_views_proximity_get_argument_options($this->view);
$loc_field_options = getlocations_fields_views_proximity_get_location_field_options();
if ($nid_argument_options) {
$form['nid_arg'] = getlocations_fields_element_nid_arg($this->options['nid_arg'], $nid_argument_options);
$form['nid_loc_field'] = getlocations_fields_element_nid_loc_field($this->options['nid_loc_field'], $loc_field_options);
}
if ($uid_argument_options) {
$form['uid_arg'] = getlocations_fields_element_uid_arg($this->options['uid_arg'], $uid_argument_options);
$form['uid_loc_field'] = getlocations_fields_element_uid_loc_field($this->options['uid_loc_field'], $loc_field_options);
}
### TESTING
if ($tid_argument_options) {
$form['tid_arg'] = getlocations_fields_element_tid_arg($this->options['tid_arg'], $tid_argument_options);
$form['tid_loc_field'] = getlocations_fields_element_tid_loc_field($this->options['tid_loc_field'], $loc_field_options);
}
if ($cid_argument_options) {
$form['cid_arg'] = getlocations_fields_element_cid_arg($this->options['cid_arg'], $cid_argument_options);
$form['cid_loc_field'] = getlocations_fields_element_cid_loc_field($this->options['cid_loc_field'], $loc_field_options);
}
}