You are here

public function DataManager::sqlBlock in Forena Reports 8

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

Parse a block into its data

Parameters

string $source: Text data of the SQL block definition

Return value

array block definition.

File

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

Class

DataManager

Namespace

Drupal\forena

Code

public function sqlBlock($provider, $source) {

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