While working on flag import/export #335453: Import/Export Support I have problem:
Flag's definition are in two tables. The first is {flags} and the other is {flag_types}. I'd like features module to be able to export the flag object properly. Is there a way in CTools to do it? Or should it be some custom code in features?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | ctools-export-additions-1.patch | 831 bytes | amitaibu |
Comments
Comment #1
sdboyer commentedAs far as I'm aware, export.inc doesn't support objects that are constituted across multiple tables; atm, it's very tied to the idea of defining objects per-table. I could see a route whereby we define a primary table and then have secondary join tables that get built off of it - panels displays/panes would be a good example of where this could be useful - but we don't have that support right now. But it's something I'd like to see support for.
Unless I'm missing something, merlin?
Comment #2
merlinofchaos commentedExport can't do exports from multiple tables automatically, but the use of its hooks allows more complicated objects to figure out how to do it. This is how panel displays export (they use panels_display and panels_pane) tables. It takes more work but it is doable.
There is a pending @todo item for subrecords but I've never felt the need to act on it. This might qualify as that, but the complexities of subrecords are such that I'm not keen on tackling it without some very solid use cases to try it with.
Comment #3
amitaibuMaybe we can let other modules add additions? So in the case of flag, the code will be:
Comment #4
amitaibubtw, changing your won't fix to needs review, is just so it will be visible in the issue queue, not trying to argue with you guys ;)
Comment #5
amitaibuBetter title. Maybe we should have a similar drupal_alter() in ctools_load_object() ?
Comment #6
amitaibuAs I understood from sdboyer via IRC this is not the correct way + As the flag import/ export patch no longer needs it => back to won't fix.