Currently FeedAPI Mapper seems to be able utilize .inc files only from feedapi_mapper/mappers directory, see _feedapi_mapper_load_mappers()
This patch allows other modules to encapsulate mappers. The rule is that the mapper inc files should be put into /modulname/mappers/ directory and the file ending should be .inc
After this is committed, #368561: Mapper for FeedAPI URL/GUID will work.
| Comment | File | Size | Author |
|---|---|---|---|
| feedapi_mapper_include_from_external.patch | 1.09 KB | aron novak |
Comments
Comment #1
alex_b commentedBut this can already be done by adding a hook_feedapi_mapper() implementation to the .module file, right? What additional benefit has this?
Comment #2
aron novakWith this, it's possible to store set of mappers in other modules, not only in feedapi_mapper.
First, i like the idea of storing the mappers outside of the .module files. Maybe not the same, but tests are also not inside the .module files.
Second, i think it may happend that you want a mapper for a module, but you do not want to mess up the module's source code and you want to use the original source code for feedapi_mapper as well. This structure means bigger flexibility, isn't it?
Also it seems to be a fashion to move out as much code as possible from .module files. :)
Comment #3
aron novakok, let's consider to remove these changes from the CVS before FeedAPI mapper 2.0 beta 1
Comment #4
alex_b commentedYeah, let's remove this. needs a patch : )
Comment #5
aron novak#4: the patch is in the initial post.
However i removed the change from the code.
Comment #6
aron novakComment #7
alex_b commentedWe can remove [accidentally committed] then, right?