public function TermTranslation::query in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermTranslation::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides Term::query
File
- core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermTranslation.php, line 26
Class
- TermTranslation
- Drupal 7 i18n taxonomy terms from source database.
Namespace
Drupal\taxonomy\Plugin\migrate\source\d7Code
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;
}