function ProfileFieldOptionTranslation::query

Same name in other branches
  1. 9 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php \Drupal\user\Plugin\migrate\source\d6\ProfileFieldOptionTranslation::query()
  2. 8.9.x core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php \Drupal\user\Plugin\migrate\source\d6\ProfileFieldOptionTranslation::query()
  3. 10 core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php \Drupal\user\Plugin\migrate\source\d6\ProfileFieldOptionTranslation::query()

Overrides ProfileField::query

File

core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php, line 27

Class

ProfileFieldOptionTranslation
Drupal 6 i18n profile field option labels source from database.

Namespace

Drupal\user\Plugin\migrate\source\d6

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.