You are here

public function FeedsForenaBlockFetcher::fetch in Forena Reports 7.5

Same name and namespace in other branches
  1. 7.3 feeds/FeedsForenaBlockFetcher.inc \FeedsForenaBlockFetcher::fetch()
  2. 7.4 feeds/FeedsForenaBlockFetcher.inc \FeedsForenaBlockFetcher::fetch()

File

feeds/FeedsForenaBlockFetcher.inc, line 33

Class

FeedsForenaBlockFetcher

Code

public function fetch(FeedsSource $source) {
  $source_config = $source
    ->getConfigFor($this);

  // Just return a Block result if this is a Block.
  $r = Frx::DataManager();
  $block = $source_config['source'];
  $data = @drupal_parse_info_format($source_config['data']);
  if ($r
    ->loadBlock($block)) {
    return new FeedsForenaBlockFetcherResult($block, $data);
  }
  throw new Exception('Source is not a valid Forena Data Block');
}