public function FrxBlockEditor::data in Forena Reports 7.4
Get data and working cache.
Parameters
unknown $parms:
Return value
Ambigous <unknown, string, NULL>
File
- ./
FrxBlockEditor.inc, line 122
Class
Code
public function data($parms = array(), $raw_mode = FALSE) {
// Merge in current_context
$parms = array_merge(Frx::Data()
->currentContextArray(), $parms);
$report_parms = Frx::Data()
->getContext('parm');
if ($report_parms) {
$parms = array_merge($report_parms, $parms);
}
$id = str_replace('/', '-', $this->block_name) . '-parm';
Frx::Data()
->push($parms, $id);
if ($this->edit && $this->provider) {
$xml = Frx::RepoMan()
->sqlData($this->provider, $this->block['file'], $parms);
}
else {
$xml = Frx::RepoMan()
->data($this->block_name, $raw_mode);
}
$driver = get_class(Frx::RepoMan()
->repository($this->provider));
// Allow modules to alter data returned.
$context = array(
'block' => $this->block_name,
'definition' => $this->block,
'provider' => $this->provider,
'parameters' => $parms,
'raw_mode' => $raw_mode,
'driver' => $driver,
);
drupal_alter('forena_data', $xml, $context);
if ($parms) {
Frx::Data()
->pop();
}
return $xml;
}