Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. bootstrap.inc

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

11 calls to drupal_static_reset()
drupal_flush_all_caches in core/includes/common.inc
Rebuilds the container, flushes all persistent caches, resets all variables, and rebuilds all data structures.
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.
ListItemBase::submitFieldStorageUpdate in core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
Resets the static variable on field storage update.
locale_translation_clear_cache_projects in core/modules/locale/locale.translation.inc
Clears the projects cache.

... See full list

File

core/includes/bootstrap.inc, line 432

Code

function drupal_static_reset($name = NULL) {
    drupal_static($name, NULL, TRUE);
}
RSS feed
Powered by Drupal