You are here

function _feedapi_build_feed_object in FeedAPI 5

Same name and namespace in other branches
  1. 6 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_form_alter in ./feedapi.module
Implementation of hook_form_alter().
feedapi_nodeapi in ./feedapi.module
Implementation of hook_nodeapi().
_feedapi_update in ./feedapi.module
Update feed data of an existing feed

File

./feedapi.module, line 1243
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 ($feed->url) {
    $feed = _feedapi_call_parsers($feed, $feed->parsers);
  }
  $feed->link = $feed->options->link;
  return $feed;
}