You are here

public function DataManager::saveBlock in Forena Reports 8

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

Save a data block ...

Parameters

string $data_block:

array $data:

File

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

Class

DataManager

Namespace

Drupal\forena

Code

public function saveBlock($data_block, $data) {
  list($provider, $block_name) = explode('/', $data_block, 2);
  $file = isset($data['access']) ? "--ACCESS=" . $data['access'] . "\n" . $data['file'] : $data['file'];
  $this
    ->repository($provider)->fileSvc
    ->save($data_block . '.sql', $file);
}