public function FieldGroup::query in Field Group 8.3
Same name in this branch
- 8.3 contrib/field_group_migrate/src/Plugin/migrate/source/d6/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\source\d6\FieldGroup::query()
- 8.3 contrib/field_group_migrate/src/Plugin/migrate/source/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\source\d7\FieldGroup::query()
Same name and namespace in other branches
- 8 contrib/field_group_migrate/src/Plugin/migrate/source/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\source\d7\FieldGroup::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- contrib/
field_group_migrate/ src/ Plugin/ migrate/ source/ d7/ FieldGroup.php, line 22
Class
- FieldGroup
- Drupal 7 field_group source.
Namespace
Drupal\field_group_migrate\Plugin\migrate\source\d7Code
public function query() {
$query = $this
->select('field_group', 'f')
->fields('f');
$entity_type = $this->configuration['entity_type'] ?? NULL;
$bundle = $this->configuration['bundle'] ?? NULL;
if ($entity_type) {
$query
->condition('f.entity_type', $entity_type);
if ($bundle) {
$query
->condition('f.bundle', $bundle);
}
}
return $query;
}