Problem/Motivation
Over in #2233883: Link migration needs to convert source url into the appropriate route format for storage we're adding logic to the LoadEntity specific for the link field type. As we need more processing for other field types this may become unruly. This issue is to discuss/implement howe we could simplify the load entity.
Proposed resolution
To be discussed. Probably per field type process plugins or at the very least, per field type methods on the load entity.
Remaining tasks
Discussion, patch.
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff.txt | 1.58 KB | benjy |
| #5 | 2395993-5.patch | 6.13 KB | benjy |
| #3 | 2395993-3.patch | 5.85 KB | benjy |
Comments
Comment #1
chx commentedI am against this change. Contrib can use the existing hook_migrate_load to change the migration entity after it is loaded. That's what we bet the farm on for every migration, dynamic or static. There's no need to further plugin-ify this.
Comment #2
benjy commentedPostponing this for now on #2394567: File field need associated metadata during cck_field migration and #2394571: Filter formats on cck text fields are not looked up in the idMap They don't technically block this, but they're both quite important and this issue is likely to just be a bit of a clean-up.
Comment #3
benjy commentedWe've discussed that having another plugin system for per field type processing is probably un-needed overkill. It's only really useful in core for cck fields and contrib can use the entity hooks to manipulate the process array.
So, attached patch is simply a small proposed clean-up, moving the processing into their own methods.
Comment #4
chx commentedI think a switch would be even cleaner than a chain of if-elseif
Comment #5
benjy commentedSure.
Comment #6
chx commentedNice.
Comment #7
alexpottMigrate changes are not frozen in beta. Committed cb3eb2f and pushed to 8.0.x. Thanks!