You are here

function bean_reset in Bean (for Drupal 7) 7

Reset the static variables and caches.

10 calls to bean_reset()
Bean::save in includes/bean.core.inc
Override the save to add clearing of caches
BeanCustom::delete in bean_admin_ui/plugins/BeanCustom.class.php
Delete the record from the database.
BeanCustom::revert in bean_admin_ui/plugins/BeanCustom.class.php
Revert the bean type to code defaults.
BeanCustom::save in bean_admin_ui/plugins/BeanCustom.class.php
Save the record to the database
bean_admin_ui_modules_enabled in bean_admin_ui/bean_admin_ui.module
Implements hook_modules_enabled().

... See full list

File

./bean.module, line 396
Block Entity

Code

function bean_reset($skip_menu_rebuild = FALSE, $rehash_blocks = FALSE) {

  // Clear ctools cache.
  ctools_include('plugins');
  ctools_get_plugins_reset();
  cache_clear_all('plugins:bean:types', 'cache');
  cache_clear_all('ctools_plugin_files', 'cache', TRUE);

  // Invoke modules to clear their caches.
  foreach (module_implements('bean_cache_clear') as $module) {
    module_invoke($module, 'bean_cache_clear');
  }

  // Rebuild ctools plugin types and the menu.
  ctools_plugin_get_plugin_type_info(TRUE);
  if (!$skip_menu_rebuild) {
    menu_rebuild();
  }

  // Rehashes blocks for active themes. This will populate the blocks table and allow
  // modules like blockreference to work properly.
  if ($rehash_blocks && module_exists('block')) {
    block_flush_caches();
  }
}