You are here

function ctools_custom_content_ui::edit_form_submit in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 ctools_custom_content/plugins/export_ui/ctools_custom_content_ui.class.php \ctools_custom_content_ui::edit_form_submit()

Handle the submission of the edit form.

At this point, submission is successful. Our only responsibility is to copy anything out of values onto the item that we are able to edit.

If the keys all match up to the schema, this method will not need to be overridden.

Overrides ctools_export_ui::edit_form_submit

File

ctools_custom_content/plugins/export_ui/ctools_custom_content_ui.class.php, line 37

Class

ctools_custom_content_ui

Code

function edit_form_submit(&$form, &$form_state) {
  parent::edit_form_submit($form, $form_state);

  // Since items in our settings are not in the schema, we have to do these manually:
  $form_state['item']->settings['title'] = $form_state['values']['title'];
  $form_state['item']->settings['body'] = $form_state['values']['body'];
  $form_state['item']->settings['format'] = $form_state['values']['format'];
  $form_state['item']->settings['substitute'] = $form_state['values']['substitute'];
}