public function Concat::transform in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Plugin/migrate/process/Concat.php \Drupal\migrate\Plugin\migrate\process\Concat::transform()
Concatenates the strings in the current value.
Overrides ProcessPluginBase::transform
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ process/ Concat.php, line 30 - Contains \Drupal\migrate\Plugin\migrate\process\Concat.
Class
- Concat
- Concatenates the strings in the current value.
Namespace
Drupal\migrate\Plugin\migrate\processCode
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (is_array($value)) {
$delimiter = isset($this->configuration['delimiter']) ? $this->configuration['delimiter'] : '';
return implode($delimiter, $value);
}
else {
throw new MigrateException(sprintf('%s is not an array', var_export($value, TRUE)));
}
}