VocabularyPerType.php in Zircon Profile 8.0
File
core/modules/taxonomy/src/Plugin/migrate/source/d6/VocabularyPerType.php
View source
<?php
namespace Drupal\taxonomy\Plugin\migrate\source\d6;
class VocabularyPerType extends Vocabulary {
public function query() {
$query = parent::query();
$query
->join('vocabulary_node_types', 'nt', 'v.vid = nt.vid');
$query
->fields('nt', array(
'type',
));
return $query;
}
public function getIds() {
$ids['vid']['type'] = 'integer';
$ids['vid']['alias'] = 'nt';
$ids['type']['type'] = 'string';
return $ids;
}
}
Classes
Name |
Description |
VocabularyPerType |
Gets all the vocabularies based on the node types that have Taxonomy enabled. |