function path_breadcrumbs_ui_edit_form_ajax_links in Path Breadcrumbs 7.2
Same name and namespace in other branches
- 7.3 path_breadcrumbs_ui/path_breadcrumbs_ui.pages.inc \path_breadcrumbs_ui_edit_form_ajax_links()
Ajax callback for path_breadcrumbs EDIT links.
1 string reference to 'path_breadcrumbs_ui_edit_form_ajax_links'
- path_breadcrumbs_ui_menu in path_breadcrumbs_ui/
path_breadcrumbs_ui.module - Implements hook_menu().
File
- path_breadcrumbs_ui/
path_breadcrumbs_ui.pages.inc, line 129
Code
function path_breadcrumbs_ui_edit_form_ajax_links($breadcrumb, $step) {
$form_state = array(
'storage' => array(
'machine_name' => $breadcrumb->machine_name,
'step' => $step,
),
);
$form = drupal_build_form('path_breadcrumbs_ui_edit_form', $form_state);
$commands = array();
$commands[] = ajax_command_replace('#path-breadcrumbs-ui-form-wrapper', render($form));
$commands[] = ajax_command_invoke('#path-breadcrumbs-ui-menu li a', 'removeClass', array(
'active',
));
$commands[] = ajax_command_invoke('#path-breadcrumbs-ui-menu li a:eq(' . --$step . ')', 'addClass', array(
'active',
));
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}