function drupal_static_reset
Same name in other branches
- 7.x includes/bootstrap.inc \drupal_static_reset()
- 9 core/includes/bootstrap.inc \drupal_static_reset()
- 10 core/includes/bootstrap.inc \drupal_static_reset()
- 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.
29 calls to drupal_static_reset()
- drupal_flush_all_caches in core/
includes/ common.inc - Flushes all persistent caches, resets all variables, and rebuilds all data structures.
- FilterAPITest::testDependencyRemoval in core/
modules/ filter/ tests/ src/ Kernel/ FilterAPITest.php - Tests that filter format dependency removal works.
- filter_formats_reset in core/
modules/ filter/ filter.module - Resets the text format caches.
- FunctionalTestSetupTrait::prepareEnvironment in core/
lib/ Drupal/ Core/ Test/ FunctionalTestSetupTrait.php - Prepares the current environment for running the test.
- ImageEffectsTest::testImageEffectsCaching in core/
modules/ image/ tests/ src/ Functional/ ImageEffectsTest.php - Test image effect caching.
1 string reference to 'drupal_static_reset'
- KernelTestBase::tearDown in core/
tests/ Drupal/ KernelTests/ KernelTestBase.php
File
-
core/
includes/ bootstrap.inc, line 1004
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.