function EntityFieldManager::useCaches

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::useCaches()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::useCaches()
  3. 10 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::useCaches()

Overrides EntityFieldManagerInterface::useCaches

File

core/lib/Drupal/Core/Entity/EntityFieldManager.php, line 635

Class

EntityFieldManager
Manages the discovery of entity fields.

Namespace

Drupal\Core\Entity

Code

public function useCaches($use_caches = FALSE) {
    $this->useCaches = $use_caches;
    if (!$use_caches) {
        $this->fieldDefinitions = [];
        $this->baseFieldDefinitions = [];
        $this->fieldStorageDefinitions = [];
        $this->activeFieldStorageDefinitions = [];
    }
}

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