You are here

public function FieldInstancePerViewMode::query in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php \Drupal\field\Plugin\migrate\source\d6\FieldInstancePerViewMode::query()
  2. 9 core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php \Drupal\field\Plugin\migrate\source\d6\FieldInstancePerViewMode::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php, line 61

Class

FieldInstancePerViewMode
Drupal 6 field instance per view mode source from database.

Namespace

Drupal\field\Plugin\migrate\source\d6

Code

public function query() {
  $query = $this
    ->select('content_node_field_instance', 'cnfi')
    ->fields('cnfi', [
    'field_name',
    'type_name',
    'weight',
    'label',
    'display_settings',
    'widget_settings',
  ])
    ->fields('cnf', [
    'type',
    'module',
  ]);
  $query
    ->join('content_node_field', 'cnf', '[cnfi].[field_name] = [cnf].[field_name]');
  $query
    ->orderBy('cnfi.weight');
  return $query;
}