You are here

public function LocationGeolocationFieldInstance::query in Geolocation Field 8.3

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides FieldInstance::query

File

modules/geolocation_address/src/Plugin/migrate/source/LocationGeolocationFieldInstance.php, line 38

Class

LocationGeolocationFieldInstance
Drupal 7 geolocation field storage source for D7 location fields.

Namespace

Drupal\geolocation_address\Plugin\migrate\source

Code

public function query() {
  $query = parent::query();
  $query
    ->condition('fc.type', 'location');
  [
    'entity_type' => $entity_type,
    'bundle' => $bundle,
  ] = $this->configuration;
  if ($entity_type) {
    $query
      ->condition('fci.entity_type', $entity_type);
    if ($bundle) {
      $query
        ->condition('fci.bundle', $bundle);
    }
  }
  return $query;
}