You are here

public function Field::query in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/views/src/Plugin/views/field/Field.php \Drupal\views\Plugin\views\field\Field::query()
  2. 8 core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
  3. 8 core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/field/src/Plugin/migrate/source/d7/Field.php, line 25
Contains \Drupal\field\Plugin\migrate\source\d7\Field.

Class

Field
Drupal 7 field source from database.

Namespace

Drupal\field\Plugin\migrate\source\d7

Code

public function query() {
  $query = $this
    ->select('field_config', 'fc')
    ->distinct()
    ->fields('fc')
    ->fields('fci', array(
    'entity_type',
  ))
    ->condition('fc.active', 1)
    ->condition('fc.deleted', 0)
    ->condition('fc.storage_active', 1);
  $query
    ->join('field_config_instance', 'fci', 'fc.id = fci.field_id');
  return $query;
}