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
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.

AttachmentSize
feedapi_mapper_include_from_external.patch1.09 KB

#1

alex_b - August 6, 2009 - 14:34

But this can already be done by adding a hook_feedapi_mapper() implementation to the .module file, right? What additional benefit has this?

#2

Aron Novak - August 6, 2009 - 16:10

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

Aron Novak - August 18, 2009 - 10:39
Title:Ability to use mappers from other modules» [accidentally committed] Ability to use mappers from other modules
Priority:normal» critical

ok, let's consider to remove these changes from the CVS before FeedAPI mapper 2.0 beta 1

#4

alex_b - August 23, 2009 - 00:00
Status:needs review» needs work

Yeah, let's remove this. needs a patch : )

#5

Aron Novak - September 18, 2009 - 13:18
Status:needs work» postponed

#4: the patch is in the initial post.
However i removed the change from the code.

#6

Aron Novak - September 18, 2009 - 13:18
Priority:critical» normal

#7

alex_b - September 18, 2009 - 13:20
Title:[accidentally committed] Ability to use mappers from other modules» Ability to use mappers from other modules

We can remove [accidentally committed] then, right?

 
 

Drupal is a registered trademark of Dries Buytaert.