public function ProfileFieldOptionTranslation::query in Drupal 10
Same name and namespace in other branches
- 8 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php \Drupal\user\Plugin\migrate\source\d6\ProfileFieldOptionTranslation::query()
- 9 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 25
Class
- ProfileFieldOptionTranslation
- Drupal 6 i18n profile field option labels source from database.
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;
}