You are here

function _feedapi_build_feed_object in FeedAPI 6

Same name and namespace in other branches
  1. 5 feedapi.module \_feedapi_build_feed_object()

Builds feed object ready to be sticked onto node.

4 calls to _feedapi_build_feed_object()
feedapi_create_node in ./feedapi.module
Create a feedapi node programatically.
feedapi_nodeapi in ./feedapi.module
Implementation of hook_nodeapi().
feedapi_node_validate in ./feedapi.module
Build feed object on validate and submit. See feedapi_form_alter on finding out how it is called (via FormAPI)
_feedapi_update in ./feedapi.module
Update feed data of an existing feed

File

./feedapi.module, line 1342
Handle the submodules (for feed and item processing) Provide a basic management of feeds

Code

function _feedapi_build_feed_object($node_type, $url) {
  $feed = new stdClass();
  $feed->url = $url;
  $node_type_settings = feedapi_get_settings($node_type);
  $feed->processors = _feedapi_format_settings($node_type_settings, 'processors');
  $feed->parsers = _feedapi_format_settings($node_type_settings, 'parsers');
  if (isset($feed->url)) {
    $feed = _feedapi_call_parsers($feed, $feed->parsers, $node_type_settings['parsers']);
  }
  $feed->link = isset($feed->options->link) ? $feed->options->link : '';
  return $feed;
}