function TermTranslation::query

Same name in other branches
  1. 9 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermTranslation::query()
  2. 10 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermTranslation::query()
  3. 11.x core/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermTranslation::query()

Overrides Term::query

File

core/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php, line 23

Class

TermTranslation
Gets i18n taxonomy terms from source database.

Namespace

Drupal\taxonomy\Plugin\migrate\source\d7

Code

public function query() {
    $query = parent::query();
    if ($this->database
        ->schema()
        ->fieldExists('taxonomy_term_data', 'language')) {
        $query->addField('td', 'language', 'td_language');
    }
    if ($this->database
        ->schema()
        ->fieldExists('taxonomy_vocabulary', 'i18n_mode')) {
        $query->addField('tv', 'i18n_mode');
    }
    return $query;
}

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