You are here

public function FieldInstance::query in Zircon Profile 8

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

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php, line 26
Contains \Drupal\field\Plugin\migrate\source\d6\FieldInstance.

Class

FieldInstance
Drupal 6 field instances source from database.

Namespace

Drupal\field\Plugin\migrate\source\d6

Code

public function query() {
  $query = $this
    ->select('content_node_field_instance', 'cnfi')
    ->fields('cnfi');
  if (isset($this->configuration['node_type'])) {
    $query
      ->condition('cnfi.type_name', $this->configuration['node_type']);
  }
  $query
    ->join('content_node_field', 'cnf', 'cnf.field_name = cnfi.field_name');
  $query
    ->fields('cnf');
  return $query;
}