You are here

function FrxReportGenerator::forena_load_block in Forena Reports 6.2

Same name and namespace in other branches
  1. 7.2 FrxReportGenerator.inc \FrxReportGenerator::forena_load_block()

Returns an array of information about the data block

Parameters

$data_block:

Return value

unknown_type

File

./FrxReportGenerator.inc, line 307
Common functions used throughout the project but loaded in this file to keep the module file lean.

Class

FrxReportGenerator

Code

function forena_load_block($data_block, $clause = '') {
  @(list($provider, $block) = explode('/', $data_block, 2));

  // Get the data
  $repos = forena_repository($provider);
  if (isset($repos['data'])) {
    $provider = $repos['data'];
    if (method_exists($provider, 'load_block')) {
      $block_info = $provider
        ->load_block($block, $clause);
    }
    return $block_info;
  }
}