You are here

function boxes_reset in Boxes 7.2

Reset the static variables and caches

3 calls to boxes_reset()
BoxCustom::save in boxes_admin_ui/plugins/custom.inc
Save the record to the database
boxes_admin_ui_modules_enabled in boxes_admin_ui/boxes_admin_ui.module
Implements hook_modules_enabled().
boxes_modules_enabled in ./boxes.module
Implements hook_modules_enabled()

File

./boxes.module, line 307

Code

function boxes_reset() {
  ctools_include('plugins');

  // Clear ctools cache.
  ctools_get_plugins_reset();
  drupal_static_reset('ctools_plugins');
  drupal_static_reset('ctools_plugin_type_info_loaded');
  drupal_static_reset('ctools_plugin_type_info');

  // Clear the boxes cache.
  drupal_static_reset('boxes_fetch_plugin_info');
  drupal_static_reset('boxes_load_plugin_class');

  // Flush plugin caches and rebuild the menu
  cache_clear_all('boxes_plugins', 'cache');
  cache_clear_all('ctools_plugin_type_info', 'cache');
  cache_clear_all('ctools_plugin_files', 'cache', TRUE);
  cache_clear_all('plugins', 'cache', TRUE);
  cache_clear_all('box_types', 'cache');
  cache_clear_all('entity_info', 'cache', TRUE);
  menu_rebuild();
}