function menu_firstchild_menu_link_content_form_ajax_callback in Menu Firstchild 2.x
Same name and namespace in other branches
- 8 menu_firstchild.module \menu_firstchild_menu_link_content_form_ajax_callback()
AJAX callback.
Parameters
array $form: Form array.
\Drupal\Core\Form\FormStateInterface $form_state: Form state.
Return value
\Drupal\Core\Ajax\AjaxResponse AJAX callback response.
1 string reference to 'menu_firstchild_menu_link_content_form_ajax_callback'
File
- ./
menu_firstchild.module, line 83 - Contains menu_firstchild.module.
Code
function menu_firstchild_menu_link_content_form_ajax_callback(array &$form, FormStateInterface $form_state) {
$replace_link = new HtmlCommand('#menu-firstchild-link-wrapper', $form['link']);
$response = new AjaxResponse();
$response
->addCommand($replace_link);
return $response;
}