function TermEntityTranslation::query
Same name in other branches
- 8.9.x core/modules/taxonomy/src/Plugin/migrate/source/d7/TermEntityTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermEntityTranslation::query()
- 10 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermEntityTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermEntityTranslation::query()
- 11.x core/modules/taxonomy/src/Plugin/migrate/source/d7/TermEntityTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermEntityTranslation::query()
Overrides SqlBase::query
File
-
core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermEntityTranslation.php, line 51
Class
- TermEntityTranslation
- Drupal 7 taxonomy term entity translation source plugin.
Namespace
Drupal\taxonomy\Plugin\migrate\source\d7Code
public function query() {
$query = $this->select('entity_translation', 'et')
->fields('et')
->fields('td', [
'name',
'description',
'format',
])
->fields('tv', [
'machine_name',
])
->condition('et.entity_type', 'taxonomy_term')
->condition('et.source', '', '<>');
$query->innerJoin('taxonomy_term_data', 'td', '[td].[tid] = [et].[entity_id]');
$query->innerJoin('taxonomy_vocabulary', 'tv', '[td].[vid] = [tv].[vid]');
if (isset($this->configuration['bundle'])) {
$query->condition('tv.machine_name', (array) $this->configuration['bundle'], 'IN');
}
return $query;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.