function 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.

6 calls to ctools_export_load_object_reset()
CtoolsExportCrudTestCase::testCrudExportDelete in tests/ctools_export_test/ctools_export.test
Tests CRUD operation: Delete.
CtoolsExportCrudTestCase::testCrudExportRevert in tests/ctools_export_test/ctools_export.test
Tests CRUD operation: Revert.
CtoolsExportCrudTestCase::testCrudExportSave in tests/ctools_export_test/ctools_export.test
Tests CRUD operation: Save.
CtoolsExportCrudTestCase::testCrudExportSetStatus in tests/ctools_export_test/ctools_export.test
Tests CRUD operation: Set status.
ctools_export_crud_load_all in includes/export.inc
Load all exportable objects of a given type.

... See full list

File

includes/export.inc, line 575

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)) {
        drupal_static_reset('ctools_export_load_object');
        drupal_static_reset('ctools_export_load_object_all');
        drupal_static_reset('_ctools_export_get_defaults');
    }
    else {
        $cache =& drupal_static('ctools_export_load_object');
        $cached_database =& drupal_static('ctools_export_load_object_all');
        $cached_defaults =& drupal_static('_ctools_export_get_defaults');
        unset($cache[$table]);
        unset($cached_database[$table]);
        unset($cached_defaults[$table]);
    }
}