Ability to use mappers from other modules
Aron Novak - August 6, 2009 - 08:02
| Project: | Feed Element Mapper |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Aron Novak |
| Status: | postponed |
Jump to:
Description
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.
| Attachment | Size |
|---|---|
| feedapi_mapper_include_from_external.patch | 1.09 KB |

#1
But this can already be done by adding a hook_feedapi_mapper() implementation to the .module file, right? What additional benefit has this?
#2
With 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. :)
#3
ok, let's consider to remove these changes from the CVS before FeedAPI mapper 2.0 beta 1
#4
Yeah, let's remove this. needs a patch : )
#5
#4: the patch is in the initial post.
However i removed the change from the code.
#6
#7
We can remove [accidentally committed] then, right?