function path_breadcrumbs_ui_edit_form_ajax_callback in Path Breadcrumbs 7.2
Same name and namespace in other branches
- 7.3 path_breadcrumbs_ui/path_breadcrumbs_ui.module \path_breadcrumbs_ui_edit_form_ajax_callback()
Ajax callback for path breadcrumbs EDIT form. Redirect user to breadcrumbs list when breadcrumb is updated.
_state
Parameters
$form:
Return value
array
1 string reference to 'path_breadcrumbs_ui_edit_form_ajax_callback'
- path_breadcrumbs_ui_edit_form in path_breadcrumbs_ui/
path_breadcrumbs_ui.module - Form for editing path breadcrumbs.
File
- path_breadcrumbs_ui/
path_breadcrumbs_ui.module, line 1198 - Provide user interface for CRUD operations with path breadcrumbs.
Code
function path_breadcrumbs_ui_edit_form_ajax_callback($form, $form_state) {
if (!form_get_errors()) {
$values = $form_state['values'];
if (isset($values['update_save']) && $values['op'] == $values['update_save']) {
// Redirect user to page with breadcrumbs list.
ctools_include('ajax');
// Ajax responder not required since CTools 7.x-1.0 but this line
// should be added to keep module works properly.
ctools_add_js('ajax-responder');
$commands = array();
$commands[] = ctools_ajax_command_redirect('admin/structure/path-breadcrumbs');
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}
}
return $form;
}