You are here

function feed_import_export_feed_page in Feed Import 7

Same name and namespace in other branches
  1. 7.2 feed_import.module \feed_import_export_feed_page()

Export feed

Parameters

int $id: Feed id to be exported

Return value

string A textarea containing serialized feed code

1 string reference to 'feed_import_export_feed_page'
feed_import_menu in ./feed_import.module
Implements hook_menu().

File

./feed_import.module, line 542
User interface, cron functions for feed_import module

Code

function feed_import_export_feed_page($id = 0) {
  if ($id == 'all') {
    $feed = FeedImport::loadFeeds(FALSE);
  }
  else {
    $feed = FeedImport::loadFeeds(FALSE, $id);
    if (!$feed) {
      return MENU_NOT_FOUND;
    }
  }

  // Set page title
  drupal_set_title(t('Copy and save all code below. Paste it where you want to import feed.'));
  $feed = serialize($feed);
  return array(
    '#theme' => 'textarea',
    '#value' => $feed,
    '#rows' => 20,
  );
}