5 * Contains \Drupal\redirect\Plugin\migrate\process\d7\RedirectSourceQuery.
8 namespace Drupal\redirect\Plugin\migrate\process\d7;
10 use Drupal\migrate\MigrateExecutableInterface;
11 use Drupal\migrate\ProcessPluginBase;
12 use Drupal\migrate\Row;
15 * @MigrateProcessPlugin(
16 * id = "d7_redirect_source_query"
19 class RedirectSourceQuery extends ProcessPluginBase {
24 * Transform the field as required for an iFrame field.
26 public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
28 // Check if there are options.
30 // Check if there is a query.
31 $options = unserialize($value);
32 if (!empty($options['query'])) {
33 // Add it to the end of the url.
34 return serialize($options['query']);