function path_breadcrumbs_ui_edit_form_submit 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_submit()
Submit callback for path breadcrumbs EDIT form.
_state
Parameters
$form:
1 string reference to 'path_breadcrumbs_ui_edit_form_submit'
- 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 1174 - Provide user interface for CRUD operations with path breadcrumbs.
Code
function path_breadcrumbs_ui_edit_form_submit($form, &$form_state) {
$values = $form_state['values'];
if (isset($values['update']) && $values['op'] == $values['update']) {
// If user clicks UPDATE button breadcrumb will be automatically moved to cache.
// We just need to show user some notifications.
drupal_set_message(t('The breadcrumbs has been updated.'));
drupal_set_message(t('Changes will not be permanent until you save it.'), 'warning');
}
elseif (isset($values['update_save']) && $values['op'] == $values['update_save']) {
$breadcrumb = path_breadcrumbs_object_cache_get($form_state['storage']['machine_name']);
path_breadcrumbs_save($breadcrumb);
drupal_set_message(t('Breadcrumb %name was updated.', array(
'%name' => $breadcrumb->name,
)));
}
}