Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / taxonomy / src / Plugin / migrate / source / d7 / Term.php
index 518b9f7a412436fe5abaf45cc89a69c36fc84bf9..93b0fc4aaa45b4d98a8629197de52b0d8f2d9063 100644 (file)
@@ -12,7 +12,7 @@ use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity;
  *
  * @MigrateSource(
  *   id = "d7_taxonomy_term",
- *   source_provider = "taxonomy"
+ *   source_module = "taxonomy"
  * )
  */
 class Term extends FieldableEntity {
@@ -70,6 +70,11 @@ class Term extends FieldableEntity {
       ->fetchCol();
     $row->setSourceProperty('parent', $parents);
 
+    // Determine if this is a forum container.
+    $forum_container_tids = $this->variableGet('forum_containers', []);
+    $current_tid = $row->getSourceProperty('tid');
+    $row->setSourceProperty('is_container', in_array($current_tid, $forum_container_tids));
+
     return parent::prepareRow($row);
   }