public function BlockEditor::update in Forena Reports 8
Same name and namespace in other branches
- 7.5 src/Editor/BlockEditor.php \Drupal\forena\Editor\BlockEditor::update()
Update the block data.
Parameters
array $block: Data block definition.
Return value
2 calls to BlockEditor::update()
- BlockEditor::load in src/
Editor/ BlockEditor.php - Block loader method.
- BlockEditor::rename in src/
Editor/ BlockEditor.php - Rename the exisiting block.
File
- src/
Editor/ BlockEditor.php, line 73
Class
Namespace
Drupal\forena\EditorCode
public function update($block = array()) {
if ($block) {
// Make sure we don't put any invalid values
$block = array_intersect_key($block, $this->block);
$block = array_merge($this->block, $block);
$same = $block['file'] == $this->block['file'] && @$block['access'] == @$this->block['access'];
// UPdate the block;
if (!$same) {
$this->block = $block;
$_SESSION['forena_query_editor'][$this->block_name] = $this->block;
$this->modified = TRUE;
}
}
return $this;
}