You are here

function bean_disable in Bean (for Drupal 7) 7

Implements hook_disable().

File

./bean.install, line 272
Bean installation routines

Code

function bean_disable() {

  // Remove all of the currently placed blocks
  // Delete any blocks
  // @see block_custom_block_delete_submit()
  if (module_exists('block')) {
    db_delete('block')
      ->condition('module', 'bean')
      ->execute();
    db_delete('block_role')
      ->condition('module', 'bean')
      ->execute();

    // @see node_form_block_custom_block_delete_submit()
    db_delete('block_node_type')
      ->condition('module', 'bean')
      ->execute();
  }
}