Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: https://api.drupal.org/api/drupal/core%21modules%21migrate%21src%21Plugi...
> A process plugin can use any number of methods instead of (but not in addition to) transform with the same arguments and then the plugin configuration needs to provide the name of the method to be called via the "method" key.
That's not a clear sentence.
Comment | File | Size | Author |
---|---|---|---|
#6 | MigrateProcessInterface-docblock-fixed-2936821-6.patch | 1.44 KB | msankhala |
Comments
Comment #3
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commented@joachim I am not an expert in migration. What do you think should be the clear doc here?
Comment #4
joachim CreditAttribution: joachim as a volunteer commentedHow about:
> A process plugin will typically implement the transform() method to perform its work. However, it is possible instead for a process plugin to use any number of methods, thus offering different alternatives ways of processing. In this case, the transform() method should not be implemented, and the plugin configuration must provide the name of the method to be called via the "method" key. Each method must have the same signature as transform(). The base class \Drupal\migrate\ProcessPluginBase takes care of implementing transform() and calling the configured method.
Comment #5
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commented@joachim This makes perfect sense and more clear than the existing doc.
Comment #6
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedHere is the patch.
Comment #7
lomasr CreditAttribution: lomasr at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedI think we can include path to transform() method also core/modules/migrate/src/ProcessPluginBase.php. Which overrides public function MigrateProcessInterface::transform.
Comment #8
marxjohnson CreditAttribution: marxjohnson as a volunteer commentedThe patch applies fine and makes a lot more sense than the previous text. I don't think it's necessary to add a the full path of the file containing ProcessPluginBase. There's already a @see tag in the docblock for the MirgrateProcessInterface class so it should be linked when the docs are compiled, and PHPStorm found it fine for me on Ctrl+Click. In addition, you can see the transform() method in the MigrateProcessInterface file if you need to know the signature.
Comment #9
alexpottCrediting @joachim for filing the issue and reviewing. Crediting @lomasr and @marxjohnson reviewers for discussing the improvement.
Comment #10
alexpottCommitted and pushed 15946fea43 to 8.6.x and ad12560f98 to 8.5.x. Thanks!
As a docs improvement backported to 8.5.x.
migrate.migration.d6_field_instance_widget_settings.yml doesn't exist anymore so let's fix that as we go.
Comment #13
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commented@alexpott Should the mention of migrate.migration.d6_field_instance_widget_settings.yml should be removed in another follow-up issue or I should submit the patch on this same issue?