namespace Drupal\taxonomy\Plugin\migrate\source\d7;
+use Drupal\migrate\Row;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
/**
*
* @MigrateSource(
* id = "d7_taxonomy_vocabulary",
- * source_provider = "taxonomy"
+ * source_module = "taxonomy"
* )
*/
class Vocabulary extends DrupalSqlBase {
];
}
+ /**
+ * {@inheritdoc}
+ */
+ public function prepareRow(Row $row) {
+ // If the vocabulary being migrated is the one defined in the
+ // 'forum_nav_vocabulary' variable, set the 'forum_vocabulary' source
+ // property to true so we know this is the vocabulary used by Forum.
+ if ($this->variableGet('forum_nav_vocabulary', 0) == $row->getSourceProperty('vid')) {
+ $row->setSourceProperty('forum_vocabulary', TRUE);
+ }
+
+ return parent::prepareRow($row);
+ }
+
/**
* {@inheritdoc}
*/