You are here

function menu_block_configure_form_parent_validate in Menu Block 7.2

Same name and namespace in other branches
  1. 6.2 menu_block.admin.inc \menu_block_configure_form_parent_validate()
  2. 7.3 menu_block.admin.inc \menu_block_configure_form_parent_validate()

Validates the parent element of the block configuration form.

1 string reference to 'menu_block_configure_form_parent_validate'
menu_block_configure_form in ./menu_block.admin.inc
Returns the configuration form for a menu tree.

File

./menu_block.admin.inc, line 421
Provides infrequently used functions and hooks for menu_block.

Code

function menu_block_configure_form_parent_validate($element, &$form_state) {

  // Determine the fixed parent item's menu and mlid.
  list($menu_name, $parent_mlid) = explode(':', $form_state['values']['parent']);
  $form_state['values']['parent_mlid'] = (int) $parent_mlid;
  if ($parent_mlid) {

    // If mlid is set, its menu overrides the menu_name option.
    $form_state['values']['menu_name'] = $menu_name;
  }
}