public function TermEntityTranslation::query in Drupal 8
Same name and namespace in other branches
- 9 core/modules/taxonomy/src/Plugin/migrate/source/d7/TermEntityTranslation.php \Drupal\taxonomy\Plugin\migrate\source\d7\TermEntityTranslation::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermEntityTranslation.php, line 21
Class
- TermEntityTranslation
- Provides 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;
}