You are here

function ctools_export_ui::edit_save_form in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 plugins/export_ui/ctools_export_ui.class.php \ctools_export_ui::edit_save_form()

Called to save the final product from the edit form.

2 calls to ctools_export_ui::edit_save_form()
ctools_export_ui::edit_execute_form_standard in plugins/export_ui/ctools_export_ui.class.php
Execute the standard form for editing.
ctools_export_ui::edit_execute_form_wizard in plugins/export_ui/ctools_export_ui.class.php
Execute the wizard for editing.

File

plugins/export_ui/ctools_export_ui.class.php, line 977

Class

ctools_export_ui
Base class for export UI.

Code

function edit_save_form($form_state) {
  $item =& $form_state['item'];
  $export_key = $this->plugin['export']['key'];
  $result = ctools_export_crud_save($this->plugin['schema'], $item);
  if ($result) {
    $message = str_replace('%title', check_plain($item->{$export_key}), $this->plugin['strings']['confirmation'][$form_state['op']]['success']);
    drupal_set_message($message);
  }
  else {
    $message = str_replace('%title', check_plain($item->{$export_key}), $this->plugin['strings']['confirmation'][$form_state['op']]['fail']);
    drupal_set_message($message, 'error');
  }
}