You are here

public function DataManager::sqlBlock in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 src/DataManager.php \Drupal\forena\DataManager::sqlBlock()

Parse a block into its data

Parameters

$source Text data of the SQL block definition:

Return value

array block definition.

File

src/DataManager.php, line 283
DataManager.inc Enter description here ... @author davidmetzler

Class

DataManager

Namespace

Drupal\forena

Code

public function sqlBlock($provider, $source) {

  //Intstantiate the provider
  $o = $this
    ->repository($provider);
  $repos = @$this->repositories[$provider];
  if (isset($repos['enabled']) && !$repos['enabled']) {
    return '';
  }
  if ($o) {
    return $o
      ->parseSQLFile($source);
  }
}