Make mapper node-independent
alex_b - April 14, 2009 - 14:41
| Project: | Feed Element Mapper |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Ideally we could use FEMP for mapping not only to node-based feed items, but any feed items.
Once #397682: Let mappers declare mapping targets lands, we are a lot closer to independency from nodes, because detection of mapping targets will not be the responsibility of feedapi_mapper.module anymore.
What's missing then is wrapping the node object in a mapping target object:
// Simple mapper target object wrapper.
class feedapiMapperTarget {
public $type; // e. g. 'node'
public $object; // e. g. $node object
}and modifying the mapping code accordingly. For instance, node mappers would not react to mapping objects that aren't of type node, RDF mappers would not react to mapping targets of type RDF.

#1
#2
Taking a shot at this now.
#3
This patch passes all tests. Working on a none-node implementation using this patch now.
Ready for review.
#4
Update to reflect recent commits.
#5
- Fix admin/content/node-type forms.
- Updated api.php
I suggest committing this to a new branch DRUPAL-2 as we're changing the API slightly and there are more fundamental changes to come.
#6
Committed to 2.x.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.