You are here

function multiblock_delete_form in MultiBlock 7

Same name and namespace in other branches
  1. 5 multiblock.module \multiblock_delete_form()
  2. 6 multiblock.module \multiblock_delete_form()
1 string reference to 'multiblock_delete_form'
multiblock_menu in ./multiblock.module
Implements hook_menu().

File

./multiblock.module, line 232
Enhances the block API, as provided by D7 Core.

Code

function multiblock_delete_form($form, $form_state, $delta) {
  $block = multiblock_get_block($delta);
  if (empty($block)) {
    drupal_set_message(t('The multiblock with the delta @delta was not found.', array(
      '@delta' => $delta,
    )), 'error');
    return array();
  }
  $form['delta'] = array(
    '#type' => 'value',
    '#value' => $delta,
  );
  return confirm_form($form, t('Delete the block instance %title?', array(
    '%title' => $block->title,
  )), 'admin/structure/block/instances', t('This will delete the instance of the block %title.', array(
    '%title' => $block->title,
  )), t('Delete'), t('Cancel'));
}