function Field::query
Same name in this branch
- 8.9.x core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
Same name in other branches
- 9 core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
- 9 core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
- 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()
- 11.x core/modules/field/src/Plugin/migrate/source/d6/Field.php \Drupal\field\Plugin\migrate\source\d6\Field::query()
- 11.x core/modules/field/src/Plugin/migrate/source/d7/Field.php \Drupal\field\Plugin\migrate\source\d7\Field::query()
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.