function Concat::transform
Same name in other branches
- 8.9.x core/modules/migrate/src/Plugin/migrate/process/Concat.php \Drupal\migrate\Plugin\migrate\process\Concat::transform()
- 10 core/modules/migrate/src/Plugin/migrate/process/Concat.php \Drupal\migrate\Plugin\migrate\process\Concat::transform()
- 11.x core/modules/migrate/src/Plugin/migrate/process/Concat.php \Drupal\migrate\Plugin\migrate\process\Concat::transform()
Overrides ProcessPluginBase::transform
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ process/ Concat.php, line 64
Class
- Concat
- Concatenates a set of strings.
Namespace
Drupal\migrate\Plugin\migrate\processCode
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (is_array($value)) {
$delimiter = $this->configuration['delimiter'] ?? '';
return implode($delimiter, $value);
}
else {
throw new MigrateException(sprintf('%s is not an array', var_export($value, TRUE)));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.