public function Term::query in Drupal 8
Same name in this branch
- 8 core/modules/taxonomy/src/Plugin/migrate/source/Term.php \Drupal\taxonomy\Plugin\migrate\source\Term::query()
- 8 core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php \Drupal\taxonomy\Plugin\migrate\source\d6\Term::query()
- 8 core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php \Drupal\taxonomy\Plugin\migrate\source\d7\Term::query()
Same name and namespace in other branches
- 9 core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php \Drupal\taxonomy\Plugin\migrate\source\d7\Term::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
2 calls to Term::query()
- TermLocalizedTranslation::query in core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermLocalizedTranslation.php - TermTranslation::query in core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermTranslation.php
2 methods override Term::query()
- TermLocalizedTranslation::query in core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermLocalizedTranslation.php - TermTranslation::query in core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ TermTranslation.php
File
- core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ Term.php, line 23
Class
- Term
- Taxonomy term source from database.
Namespace
Drupal\taxonomy\Plugin\migrate\source\d7Code
public function query() {
$query = $this
->select('taxonomy_term_data', 'td')
->fields('td')
->distinct()
->orderBy('tid');
$query
->leftJoin('taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
$query
->addField('tv', 'machine_name');
if ($this
->getDatabase()
->schema()
->fieldExists('taxonomy_vocabulary', 'i18n_mode')) {
$query
->addField('tv', 'i18n_mode');
}
if (isset($this->configuration['bundle'])) {
$query
->condition('tv.machine_name', (array) $this->configuration['bundle'], 'IN');
}
return $query;
}