8.5.x bootstrap.inc drupal_static_reset($name = NULL)
8.0.x bootstrap.inc drupal_static_reset($name = NULL)
8.1.x bootstrap.inc drupal_static_reset($name = NULL)
8.2.x bootstrap.inc drupal_static_reset($name = NULL)
8.3.x bootstrap.inc drupal_static_reset($name = NULL)
8.4.x bootstrap.inc drupal_static_reset($name = NULL)
8.6.x bootstrap.inc drupal_static_reset($name = NULL)
7.x bootstrap.inc drupal_static_reset($name = NULL)

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.

42 calls to drupal_static_reset()
BrowserTestBase::prepareEnvironment in core/tests/Drupal/Tests/BrowserTestBase.php
Prepares the current environment for running the test.
BrowserTestBase::refreshVariables in core/tests/Drupal/Tests/BrowserTestBase.php
Refreshes in-memory configuration and state information.
ContentTranslationOperationsTest::setUp in core/modules/content_translation/src/Tests/ContentTranslationOperationsTest.php
Sets up a Drupal site for running functional and integration tests.
ContentTranslationTestBase::enableTranslation in core/modules/content_translation/src/Tests/ContentTranslationTestBase.php
Enables translation for the current entity type and bundle.
drupal_flush_all_caches in core/includes/common.inc
Flushes all persistent caches, resets all variables, and rebuilds all data structures.

... See full list

File

core/includes/bootstrap.inc, line 920
Functions that need to be loaded on every Drupal request.

Code

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