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

Form submission handler for block_custom_block_delete().

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.

See also

block_custom_block_delete()

File

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

Code

function block_custom_block_delete_submit($form, &$form_state) {
  config('block.custom.' . $form_state['values']['delta'])->delete();
  backdrop_set_message(t('The block %name has been removed.', array('%name' => $form_state['values']['info'])));
  $form_state['redirect'] = 'admin/structure/block';
}