You are here

function ctools_export_load_object_reset in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/export.inc \ctools_export_load_object_reset()

Reset all static caches in ctools_export_load_object() or static caches for a given table in ctools_export_load_object().

Parameters

$table: String that is the name of a table. If not defined, all static caches in ctools_export_load_object() will be reset.

2 calls to ctools_export_load_object_reset()
ctools_export_crud_load_all in includes/export.inc
Load all exportable objects of a given type.
page_manager_page_delete in page_manager/plugins/tasks/page.inc
Remove a page subtask.

File

includes/export.inc, line 477
Contains code to make it easier to have exportable objects.

Code

function ctools_export_load_object_reset($table = NULL) {

  // Reset plugin cache to make sure new include files are picked up.
  ctools_include('plugins');
  ctools_get_plugins_reset();
  if (empty($table)) {
    ctools_static_reset('ctools_export_load_object');
    ctools_static_reset('ctools_export_load_object_all');
    ctools_static_reset('_ctools_export_get_defaults');
  }
  else {
    $cache =& ctools_static('ctools_export_load_object');
    $cached_database =& ctools_static('ctools_export_load_object_all');
    $cached_defaults =& ctools_static('_ctools_export_get_defaults');
    unset($cache[$table]);
    unset($cached_database[$table]);
    unset($cached_defaults[$table]);
  }
}