function ctools_export_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.
2 calls to ctools_export_ui::edit_form_submit()
- ctools_access_ruleset_ui::edit_form_submit in ctools_access_ruleset/
plugins/ export_ui/ ctools_access_ruleset_ui.class.php - Handle the submission of the edit form.
- ctools_custom_content_ui::edit_form_submit in ctools_custom_content/
plugins/ export_ui/ ctools_custom_content_ui.class.php - Handle the submission of the edit form.
2 methods override ctools_export_ui::edit_form_submit()
- ctools_access_ruleset_ui::edit_form_submit in ctools_access_ruleset/
plugins/ export_ui/ ctools_access_ruleset_ui.class.php - Handle the submission of the edit form.
- ctools_custom_content_ui::edit_form_submit in ctools_custom_content/
plugins/ export_ui/ ctools_custom_content_ui.class.php - Handle the submission of the edit form.
File
-
plugins/
export_ui/ ctools_export_ui.class.php, line 1147
Class
- ctools_export_ui
- Base class for export UI.
Code
public function edit_form_submit(&$form, &$form_state) {
if (!empty($this->plugin['form']['submit'])) {
// Pass $form by reference.
$this->plugin['form']['submit']($form, $form_state);
}
// Transfer data from the form to the $item based upon schema values.
$schema = ctools_export_get_schema($this->plugin['schema']);
foreach (array_keys($schema['fields']) as $key) {
if (isset($form_state['values'][$key])) {
$form_state['item']->{$key} = $form_state['values'][$key];
}
}
}