Add the build_array process plugin
1 unresolved thread
1 unresolved thread
Closes #3440904
Merge request reports
Activity
added 6 commits
Toggle commit listadded 2 commits
- Resolved by Lucas Hedding
- src/Plugin/migrate/process/ArrayTemplate.php 0 → 100644
66 * @MigrateProcessPlugin(id = "array_template") 67 */ 68 final class ArrayTemplate extends ProcessPluginBase { 69 70 /** 71 * {@inheritdoc} 72 */ 73 public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property): array { 74 $template = $this->configuration['template'] ?? NULL; 75 if (!is_array($template)) { 76 throw new \InvalidArgumentException('The "template" must be set to an array.'); 77 } 78 79 $args = ['row' => $row, 'pipeline' => $value]; 80 if (!array_walk_recursive($template, [$this, 'process'], $args)) { 81 throw new MigrateException('There was a problem processing the template.'); @benjifisher Is there any reasonable way to get this line to run? I'm seeing that in php8 array_walk_recursive ALWAYS returns true. (That just seems nutty though!)
changed this line in version 6 of the diff
- Resolved by Lucas Hedding
- Resolved by Lucas Hedding
- Resolved by Lucas Hedding
added 16 commits
-
09c7a6bb...93efe818 - 9 commits from branch
project:6.0.x
- 12a6fa67 - Add the build_array process plugin
- 3f9b60c1 - Add the test from Issue #3314502
- 8d21806c - Test that build_array can replace wrapper
- 912674f6 - Add a complex test of build_array
- 3eb0b23b - Change name from build_array to array_template
- b5fca831 - Miscellaneous code updates
- 6e006f68 - Correctly handle unrecognized prefix
Toggle commit list-
09c7a6bb...93efe818 - 9 commits from branch
Please register or sign in to reply