public function Field::query in Drupal 10
Same name in this branch
- 10 core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
- 10 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
- 8 core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
- 9 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
1 method overrides Field::query()
- FieldOptionTranslation::query in core/
modules/ field/ src/ Plugin/ migrate/ source/ d7/ FieldOptionTranslation.php
File
- core/
modules/ field/ src/ Plugin/ migrate/ source/ d7/ Field.php, line 30
Class
- Field
- Drupal 7 field source from database.
Namespace
Drupal\field\Plugin\migrate\source\d7Code
public function query() {
$query = $this
->select('field_config', 'fc')
->distinct()
->fields('fc')
->fields('fci', [
'entity_type',
])
->condition('fc.active', 1)
->condition('fc.storage_active', 1)
->condition('fc.deleted', 0)
->condition('fci.deleted', 0);
$query
->join('field_config_instance', 'fci', '[fc].[id] = [fci].[field_id]');
// The Title module fields are not migrated.
if ($this
->moduleExists('title')) {
$title_fields = [
'title_field',
'name_field',
'description_field',
'subject_field',
];
$query
->condition('fc.field_name', $title_fields, 'NOT IN');
}
return $query;
}