public function FrxBlockEditor::load in Forena Reports 7.4
Block loader method.
Parameters
$block_name:
1 call to FrxBlockEditor::load()
File
- ./
FrxBlockEditor.inc, line 33
Class
Code
public function load($block_name, $edit = TRUE) {
$block_name = str_replace('.', '/', $block_name);
@(list($provider, $path) = explode('/', $block_name, 2));
$this->provider = $provider;
$this->block_name = $block_name;
if (isset($_SESSION['forena_query_editor'][$block_name]) && $edit) {
$block = $_SESSION['forena_query_editor'][$block_name];
drupal_set_message(t('All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard your changes.'), 'warning', FALSE);
$this->modified = TRUE;
}
else {
$block = Frx::RepoMan()
->loadBlock($block_name);
$this->modified = FALSE;
if (!$block) {
$block = $this->block = $this->new_block;
$this
->update($this->block);
}
}
$this->block = $block;
return $block;
}