You are here

function menu_block_add_block_form in Menu Block 7.2

Same name and namespace in other branches
  1. 5.2 menu_block.module \menu_block_add_block_form()
  2. 6.2 menu_block.admin.inc \menu_block_add_block_form()
  3. 7.3 menu_block.admin.inc \menu_block_add_block_form()

Menu callback: display the menu block addition form.

See also

menu_block_add_block_form_submit()

1 string reference to 'menu_block_add_block_form'
menu_block_menu in ./menu_block.module
Implements hook_menu().

File

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

Code

function menu_block_add_block_form($form, &$form_state) {
  module_load_include('inc', 'block', 'block.admin');
  $form = block_admin_configure($form, $form_state, 'menu_block', NULL);

  // Other modules should be able to use hook_form_block_add_block_form_alter()
  // to modify this form, so add a base form ID.
  $form_state['build_info']['base_form_id'] = 'block_add_block_form';

  // Prevent block_add_block_form_validate/submit() from being automatically
  // added because of the base form ID by providing these handlers manually.
  $form['#validate'] = array();
  $form['#submit'] = array(
    'menu_block_add_block_form_submit',
  );
  return $form;
}