1 admin_bar.inc admin_bar_theme_settings_submit($form, &$form_state)

Submit handler for admin_bar_theme_settings().


core/modules/admin_bar/admin_bar.inc, line 901
Menu builder functions for Administration bar.


function admin_bar_theme_settings_submit($form, &$form_state) {
  $components = &$form_state['values']['components'];

  // Disable back to site if icon bar is also disabled.
  if (!$components['admin_bar.icon']) {
    $components['admin_bar.back_to_site_link'] = FALSE;
  // Disable the search bar if the management menu is also disabled.
  if (!$components['admin_bar.menu']) {
    $components['admin_bar.search'] = FALSE;

  // Save the list of components as a simple array, rather than key/value pair.
  $form_state['values']['components'] = array_keys(array_filter($components));