You are here

function feeds_source_status in Feeds 8.2

Same name and namespace in other branches
  1. 7.2 feeds.pages.inc \feeds_source_status()

Renders a status display for a source.

4 calls to feeds_source_status()
feeds_delete_tab_form in ./feeds.pages.inc
Render a feeds delete form.
feeds_import_form in ./feeds.pages.inc
Render a feeds import form on import/[config] pages.
feeds_import_tab_form in ./feeds.pages.inc
Render a feeds import form on node/id/import pages.
feeds_unlock_tab_form in ./feeds.pages.inc
Render a feeds unlock form.

File

./feeds.pages.inc, line 285
Menu callbacks, form callbacks and helpers.

Code

function feeds_source_status($source) {
  $progress_importing = $source
    ->progressImporting();
  $v = array();
  if ($progress_importing != FEEDS_BATCH_COMPLETE) {
    $v['progress_importing'] = $progress_importing;
  }
  $progress_clearing = $source
    ->progressClearing();
  if ($progress_clearing != FEEDS_BATCH_COMPLETE) {
    $v['progress_clearing'] = $progress_clearing;
  }
  $v['imported'] = $source->imported;
  $v['count'] = $source
    ->itemCount();
  if (!empty($v)) {
    return theme('feeds_source_status', $v);
  }
}