function ForumVocabulary::transform

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

Overrides ProcessPluginBase::transform

File

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

Class

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

Namespace

Drupal\forum\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.