You are here

public function DataManager::loadBlock in Forena Reports 8

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

Load Block Enter description here ...

Parameters

$data_block string name of data block.:

Return value

array block definition.

1 call to DataManager::loadBlock()
DataManager::data in src/DataManager.php
Extract the data by running a block

File

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

Class

DataManager

Namespace

Drupal\forena

Code

public function loadBlock($data_block) {
  $block = array();
  list($provider, $block_name) = explode('/', $data_block, 2);
  $repos = @$this->repositories[$provider];
  if (isset($repos['enabled']) && !$repos['enabled']) {
    return array();
  }
  $o = $this
    ->repository($provider);
  if ($o) {
    $block = $o
      ->loadBlock($block_name);
  }
  return $block;
}