public function FrxRepoMan::saveBlock in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 FrxRepoMan.inc \FrxRepoMan::saveBlock()
Save a data block ...
Parameters
unknown_type $data_block:
unknown_type $data:
File
- ./
FrxRepoMan.inc, line 156 - FrxRepoMan.inc Enter description here ... @author davidmetzler
Class
- FrxRepoMan
- @file FrxRepoMan.inc Enter description here ... @author davidmetzler
Code
public function saveBlock($data_block, $data) {
$block = array();
list($provider, $block_name) = explode('/', $data_block, 2);
$modified = time();
$builder = @$data['builder'];
if (is_array($builder)) {
$builder = serialize($builder);
}
$file = isset($data['access']) ? "--ACCESS=" . $data['access'] . "\n" . $data['file'] : $data['file'];
Frx::DataFile()
->save($data_block . '.sql', $file);
}