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.

Comments

alex_b’s picture

Title: Make mapper node independent » Make mapper node-independent
alex_b’s picture

Assigned: Unassigned » alex_b

Taking a shot at this now.

alex_b’s picture

Assigned: alex_b » Unassigned
Status: Active » Needs review
StatusFileSize
new16.98 KB

This patch passes all tests. Working on a none-node implementation using this patch now.

Ready for review.

alex_b’s picture

StatusFileSize
new17.04 KB

Update to reflect recent commits.

alex_b’s picture

StatusFileSize
new18.82 KB

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

alex_b’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Fixed

Committed to 2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.