function VocabularyPerType::query

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php \Drupal\taxonomy\Plugin\migrate\source\d6\VocabularyPerType::query()
  2. 10 core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php \Drupal\taxonomy\Plugin\migrate\source\d6\VocabularyPerType::query()
  3. 11.x core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php \Drupal\taxonomy\Plugin\migrate\source\d6\VocabularyPerType::query()

Overrides Vocabulary::query

File

core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php, line 20

Class

VocabularyPerType
Gets all the vocabularies based on the node types that have Taxonomy enabled.

Namespace

Drupal\taxonomy\Plugin\migrate\source\d6

Code

public function query() {
    $query = parent::query();
    $query->join('vocabulary_node_types', 'nt', 'v.vid = nt.vid');
    $query->fields('nt', [
        'type',
    ]);
    return $query;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.