You are here

public function FieldLabelDescriptionTranslation::query in Drupal 10

Same name in this branch
  1. 10 core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d6\FieldLabelDescriptionTranslation::query()
  2. 10 core/modules/field/src/Plugin/migrate/source/d7/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d7\FieldLabelDescriptionTranslation::query()
Same name and namespace in other branches
  1. 8 core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d6\FieldLabelDescriptionTranslation::query()
  2. 9 core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php \Drupal\field\Plugin\migrate\source\d6\FieldLabelDescriptionTranslation::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php, line 25

Class

FieldLabelDescriptionTranslation
Drupal 6 i18n field label and description source from database.

Namespace

Drupal\field\Plugin\migrate\source\d6

Code

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