/**
  * {@inheritdoc}.
  */
 public function buildOptionsForm(&$form, &$form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['source'] = array('#type' => 'select', '#title' => t('Source of Origin Point'), '#description' => t('How do you want to enter your origin point?'), '#options' => array(), '#default_value' => $this->options['source']);
     $proximityHandlers = geofield_proximity_views_handlers();
     foreach ($proximityHandlers as $key => $handler) {
         $form['source']['#options'][$key] = $handler['name'];
         $proximityPlugin = geofield_proximity_load_plugin($key);
         $proximityPlugin->options_form($form, $form_state, $this);
     }
     $form['radius_of_earth'] = array('#type' => 'select', '#title' => t('Unit of Measure'), '#description' => '', '#options' => geofield_radius_options(), '#default_value' => $this->options['radius_of_earth']);
 }
Example #2
0
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     $form['link_to_comment'] = array('#title' => t('Link this field to new comments'), '#description' => t("Enable to override this field's links."), '#type' => 'checkbox', '#default_value' => $this->options['link_to_comment']);
     parent::buildOptionsForm($form, $form_state);
 }