You are here

function twitter_block_add_block_form in Twitter Block 7.2

Same name and namespace in other branches
  1. 7 twitter_block.admin.inc \twitter_block_add_block_form()

Form constructor for the add block form.

See also

twitter_block_add_block_form_validate()

twitter_block_add_block_form_submit()

1 string reference to 'twitter_block_add_block_form'
twitter_block_menu in ./twitter_block.module
Implements hook_menu().

File

./twitter_block.admin.inc, line 37
Admin page callbacks for the Twitter Block module.

Code

function twitter_block_add_block_form($form, &$form_state) {
  module_load_include('inc', 'block', 'block.admin');
  $form = block_admin_configure($form, $form_state, 'twitter_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(
    'twitter_block_add_block_form_validate',
  );
  $form['#submit'] = array(
    'twitter_block_add_block_form_submit',
  );
  return $form;
}