function ForumVocabulary::transform

Same name in other branches
  1. 9 core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php \Drupal\taxonomy\Plugin\migrate\process\ForumVocabulary::transform()
  2. 10 core/modules/forum/src/Plugin/migrate/process/ForumVocabulary.php \Drupal\forum\Plugin\migrate\process\ForumVocabulary::transform()
  3. 10 core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php \Drupal\taxonomy\Plugin\migrate\process\ForumVocabulary::transform()
  4. 11.x core/modules/forum/src/Plugin/migrate/process/ForumVocabulary.php \Drupal\forum\Plugin\migrate\process\ForumVocabulary::transform()

Overrides ProcessPluginBase::transform

File

core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php, line 39

Class

ForumVocabulary
Checks if the vocabulary being migrated is the one used for forums.

Namespace

Drupal\taxonomy\Plugin\migrate\process

Code

public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    if ($row->getSourceProperty('forum_vocabulary') && !empty($this->configuration['machine_name'])) {
        $value = $this->configuration['machine_name'];
    }
    return $value;
}

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