3 namespace Drupal\taxonomy\Plugin\migrate\source\d7;
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
8 * Drupal 7 vocabularies source from database.
11 * id = "d7_taxonomy_vocabulary",
12 * source_provider = "taxonomy"
15 class Vocabulary extends DrupalSqlBase {
20 public function query() {
21 $query = $this->select('taxonomy_vocabulary', 'v')
37 public function fields() {
39 'vid' => $this->t('The vocabulary ID.'),
40 'name' => $this->t('The name of the vocabulary.'),
41 'description' => $this->t('The description of the vocabulary.'),
42 'hierarchy' => $this->t('The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)'),
43 'module' => $this->t('Module responsible for the vocabulary.'),
44 'weight' => $this->t('The weight of the vocabulary in relation to other vocabularies.'),
45 'machine_name' => $this->t('Unique machine name of the vocabulary.')
52 public function getIds() {
53 $ids['vid']['type'] = 'integer';