function FieldLabelDescriptionTranslation::query
Same name in this branch
- 8.9.x core/modules/field/src/Plugin/migrate/source/d7/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d7\FieldLabelDescriptionTranslation::query()
Same name in other branches
- 9 core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d6\FieldLabelDescriptionTranslation::query()
- 9 core/modules/field/src/Plugin/migrate/source/d7/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d7\FieldLabelDescriptionTranslation::query()
- 10 core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d6\FieldLabelDescriptionTranslation::query()
- 10 core/modules/field/src/Plugin/migrate/source/d7/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d7\FieldLabelDescriptionTranslation::query()
- 11.x core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d6\FieldLabelDescriptionTranslation::query()
- 11.x core/modules/field/src/Plugin/migrate/source/d7/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d7\FieldLabelDescriptionTranslation::query()
Overrides SqlBase::query
File
-
core/
modules/ field/ src/ Plugin/ migrate/ source/ d6/ FieldLabelDescriptionTranslation.php, line 20
Class
- FieldLabelDescriptionTranslation
- Gets field label and description translations.
Namespace
Drupal\field\Plugin\migrate\source\d6Code
public function query() {
// Get translations for field labels and descriptions.
$query = $this->select('i18n_strings', 'i18n')
->fields('i18n', [
'property',
'objectid',
'type',
])
->fields('lt', [
'lid',
'translation',
'language',
])
->condition('i18n.type', 'field');
$condition = $query->orConditionGroup()
->condition('property', 'widget_label')
->condition('property', 'widget_description');
$query->condition($condition);
$query->innerJoin('locales_target', 'lt', 'lt.lid = i18n.lid');
return $query;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.