public function MessageProcessArguments::transform in Message 8
Transform the arguments of the message.
Overrides ProcessPluginBase::transform
File
- src/
Plugin/ migrate/ process/ MessageProcessArguments.php, line 21
Class
- MessageProcessArguments
- Plugin annotation @MigrateProcessPlugin( id = "d7_message_arguments" )
Namespace
Drupal\message\Plugin\migrate\processCode
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$value = unserialize($value[0]);
$arguments = [];
foreach ($value as $key => $value) {
$key = $key[0] == '!' ? substr_replace($key, '@', 0, 1) : $key;
$arguments[$key] = $value;
}
return $arguments;
}