function drupal_static_reset

Same name in other branches
  1. 9 core/includes/bootstrap.inc \drupal_static_reset()
  2. 8.9.x core/includes/bootstrap.inc \drupal_static_reset()
  3. 10 core/includes/bootstrap.inc \drupal_static_reset()
  4. 11.x core/includes/bootstrap.inc \drupal_static_reset()

Resets one or all centrally stored static variable(s).

Parameters

$name: Name of the static variable to reset. Omit to reset all variables. Resetting all variables should only be used, for example, for running unit tests with a clean environment.

112 calls to drupal_static_reset()
block_page_build in modules/block/block.module
Implements hook_page_build().
book_node_delete in modules/book/book.module
Implements hook_node_delete().
BootstrapGetFilenameTestCase::testDrupalGetFilename in modules/simpletest/tests/bootstrap.test
Test that drupal_get_filename() works correctly when the file is not found in the database.
BootstrapIPAddressTestCase::setUp in modules/simpletest/tests/bootstrap.test
Sets up a Drupal site for running functional and integration tests.
BootstrapIPAddressTestCase::tearDown in modules/simpletest/tests/bootstrap.test
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.

... See full list

File

includes/bootstrap.inc, line 3801

Code

function drupal_static_reset($name = NULL) {
    drupal_static($name, NULL, TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.