function Field::query

Same name in this branch
  1. 11.x core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
Same name in other branches
  1. 9 core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
  2. 9 core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
  3. 8.9.x core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
  4. 8.9.x core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
  5. 10 core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
  6. 10 core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()

Overrides SqlBase::query

1 method overrides Field::query()
FieldOptionTranslation::query in core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php

File

core/modules/field/src/Plugin/migrate/source/d6/Field.php, line 28

Class

Field
Drupal 6 field source from database.

Namespace

Drupal\field\Plugin\migrate\source\d6

Code

public function query() {
    $query = $this->select('content_node_field', 'cnf')
        ->fields('cnf', [
        'field_name',
        'type',
        'global_settings',
        'required',
        'multiple',
        'db_storage',
        'module',
        'db_columns',
        'active',
        'locked',
    ])
        ->distinct();
    // Only import fields which are actually being used.
    $query->innerJoin('content_node_field_instance', 'cnfi', '[cnfi].[field_name] = [cnf].[field_name]');
    return $query;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.