function path_breadcrumbs_ui_edit_form 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()
Form for editing path breadcrumbs.
_state
Parameters
$form:
Return value
array
3 string references to 'path_breadcrumbs_ui_edit_form'
- path_breadcrumbs_ui_edit_form_ajax_links in path_breadcrumbs_ui/
path_breadcrumbs_ui.pages.inc - Ajax callback for path_breadcrumbs EDIT links.
- path_breadcrumbs_ui_edit_page in path_breadcrumbs_ui/
path_breadcrumbs_ui.pages.inc - Form for editing path breadcrumbs.
- _path_breadcrumbs_ui_form_attach_buttons in path_breadcrumbs_ui/
path_breadcrumbs_ui.module - Attach ajax-processed buttons to the form.
File
- path_breadcrumbs_ui/
path_breadcrumbs_ui.module, line 1131 - Provide user interface for CRUD operations with path breadcrumbs.
Code
function path_breadcrumbs_ui_edit_form($form, $form_state) {
// Load form for creation of breadcrumbs but with existing breadcrumb in cache.
$form = path_breadcrumbs_ui_add_form(array(), $form_state, FALSE, 'edit-form');
// Disable machine name edition.
if (isset($form['machine_name'])) {
$form['machine_name']['#disabled'] = TRUE;
}
// Set two submit buttons for every form.
$form['actions'] = array(
'#type' => 'action',
'#weight' => 100,
);
$base = array(
'#type' => 'submit',
'#ajax' => array(
'callback' => 'path_breadcrumbs_ui_edit_form_ajax_callback',
'wrapper' => 'path-breadcrumbs-ui-form-wrapper',
),
);
$form['actions']['update'] = array(
'#value' => t('Update'),
) + $base;
$form['actions']['update_save'] = array(
'#value' => t('Update and Save'),
) + $base;
$form['#submit'][] = 'path_breadcrumbs_ui_edit_form_submit';
return $form;
}