You are here

public function GeolocationGeometry::buildOptionsForm in Geolocation Field 8.3

Provide a form to edit options for this plugin.

Overrides RelationshipPluginBase::buildOptionsForm

File

modules/geolocation_geometry/src/Plugin/views/relationship/GeolocationGeometry.php, line 67

Class

GeolocationGeometry
Geometry joins.

Namespace

Drupal\geolocation_geometry\Plugin\views\relationship

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['geometry_join_type'] = [
    '#type' => 'select',
    '#options' => [
      'geolocation_geometry_within' => $this
        ->t('This field ST_WITHIN that geometry'),
      'geolocation_geometry_contains' => $this
        ->t('This field ST_CONTAINS that geometry'),
      'geolocation_geometry_intersects' => $this
        ->t('This field ST_INTERSECT that geometry'),
    ],
    '#title' => $this
      ->t('Relationship type'),
    '#description' => $this
      ->t('Spatial join type on DB level'),
    '#default_value' => $this->options['geometry_join_type'],
  ];
}