public function ProfileFieldOptionTranslation::query in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php \Drupal\user\Plugin\migrate\source\d6\ProfileFieldOptionTranslation::query()
- 10 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php \Drupal\user\Plugin\migrate\source\d6\ProfileFieldOptionTranslation::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides ProfileField::query
File
- core/
modules/ user/ src/ Plugin/ migrate/ source/ d6/ ProfileFieldOptionTranslation.php, line 20
Class
- ProfileFieldOptionTranslation
- Gets field option label translations.
Namespace
Drupal\user\Plugin\migrate\source\d6Code
public function query() {
$query = parent::query();
$query
->fields('i18n', [
'property',
'objectid',
])
->fields('lt', [
'translation',
'language',
])
->condition('i18n.type', 'field')
->condition('property', 'options');
$query
->leftjoin('i18n_strings', 'i18n', 'pf.name = i18n.objectid');
$query
->innerJoin('locales_target', 'lt', 'lt.lid = i18n.lid');
return $query;
}