1 block.admin.inc block_add_block_form_submit($form, &$form_state)

Form submission handler for block_add_block_form().

Parameters

array $form: An associative array containing the structure of a portion of the form.

array $form_state: A keyed array containing the current state of the form.

Saves the new custom block.

See also

block_add_block_form()

block_add_block_form_validate()

File

core/modules/block/block.admin.inc, line 254
Admin page callbacks for the Block module.

Code

function block_add_block_form_submit($form, &$form_state) {
  block_custom_block_save($form_state['values'], $form_state['values']['delta']);
  backdrop_set_message(t('The block has been created.'));
  $form_state['redirect'] = 'admin/structure/block';
}