function TermNode::query
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- 
              core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d6/ TermNode.php, line 48  
Class
- TermNode
 - Drupal 6 term/node relationships (current revision) source from database.
 
Namespace
Drupal\taxonomy\Plugin\migrate\source\d6Code
public function query() {
  $query = $this->select('term_node', 'tn')
    ->distinct()
    ->fields('tn', [
    'nid',
    'vid',
  ])
    ->fields('n', [
    'type',
  ]);
  // Because this is an inner join it enforces the current revision.
  $query->innerJoin('term_data', 'td', '[td].[tid] = [tn].[tid] AND [td].[vid] = :vid', [
    ':vid' => $this->configuration['vid'],
  ]);
  $query->innerJoin('node', 'n', static::JOIN);
  return $query;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.