public function Field::query in Drupal 8
Same name in this branch
- 8 core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
- 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
- 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 call to Field::query()
- FieldOptionTranslation::query in core/
modules/ field/ src/ Plugin/ migrate/ source/ d7/ FieldOptionTranslation.php
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 21
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');
// If the Drupal 7 Title module is enabled, we don't want to migrate the
// fields it provides. The values of those fields will be migrated to the
// base fields they were replacing.
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;
}