function TargetBundle::transform

Same name in other branches
  1. 9 core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php \Drupal\taxonomy\Plugin\migrate\process\TargetBundle::transform()
  2. 10 core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php \Drupal\taxonomy\Plugin\migrate\process\TargetBundle::transform()

Overrides ProcessPluginBase::transform

File

core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php, line 19

Class

TargetBundle
Converts a Drupal 6 vocabulary ID to a target bundle array.

Namespace

Drupal\taxonomy\Plugin\migrate\process

Code

public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    $target_bundle = [];
    $vid = $row->get('@_vid');
    $target_bundle[$vid] = $vid;
    return $target_bundle;
}

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