You are here

public function ReportEditor::save in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::save()

Save report

File

src/Editor/ReportEditor.php, line 199
ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

ReportEditor

Namespace

Drupal\forena\Editor

Code

public function save() {
  $this
    ->cleanup_ids();
  unset($_SESSION['forena_report_editor'][$this->report_name]);
  forena_save_report($this->report_name, $this
    ->asXML(), TRUE);
  drupal_set_message(t('Your report, %s has been saved.', array(
    '%s' => $this->report_name,
  )));
  drupal_get_messages('warning');
  $cid = 'forena:report:' . $this->report_name . '%';

  // Remove cache entries
  db_delete('cache')
    ->condition('cid', $cid, 'LIKE')
    ->execute();
  menu_rebuild();
}